Browse Source

* Merging revisions r46230,r46232 from trunk:
------------------------------------------------------------------------
r46230 | michael | 2020-08-04 15:56:43 +0200 (Tue, 04 Aug 2020) | 1 line

* Additional options for latest pas2js version features
------------------------------------------------------------------------
r46232 | michael | 2020-08-04 17:50:45 +0200 (Tue, 04 Aug 2020) | 1 line

* Set path to local version of fcl-passrc, not installed version
------------------------------------------------------------------------

git-svn-id: branches/fixes_3_2@46603 -

michael 4 years ago
parent
commit
161e7862e7
2 changed files with 5 additions and 2 deletions
  1. 3 0
      utils/pas2js/makestub.lpi
  2. 2 2
      utils/pas2js/stubcreator.pp

+ 3 - 0
utils/pas2js/makestub.lpi

@@ -23,6 +23,9 @@
       <Version Value="2"/>
       <Version Value="2"/>
     </PublishOptions>
     </PublishOptions>
     <RunParams>
     <RunParams>
+      <local>
+        <CommandLineParams Value="--input=&quot;$HOME/source/pas2js/src/rtl/web.pas -S2h&quot; --no-externalclass --no-implementation --no-externalvar --no-externalfunction -x jstypes -o web.pp"/>
+      </local>
       <FormatVersion Value="2"/>
       <FormatVersion Value="2"/>
       <Modes Count="1">
       <Modes Count="1">
         <Mode0 Name="default">
         <Mode0 Name="default">

+ 2 - 2
utils/pas2js/stubcreator.pp

@@ -302,7 +302,7 @@ begin
       FileResolver.AddIncludePath(S);
       FileResolver.AddIncludePath(S);
     // Scanner
     // Scanner
     Scanner := TPascalScanner.Create(FileResolver);
     Scanner := TPascalScanner.Create(FileResolver);
-    Scanner.Options:=[po_AsmWhole,po_KeepClassForward];
+    Scanner.Options:=[po_AsmWhole,po_KeepClassForward,po_ExtConstWithoutExpr];
     SCanner.LogEvents:=SE.ScannerLogEvents;
     SCanner.LogEvents:=SE.ScannerLogEvents;
     SCanner.OnLog:=SE.Onlog;
     SCanner.OnLog:=SE.Onlog;
     For S in FDefines do
     For S in FDefines do
@@ -312,7 +312,7 @@ begin
     Parser:=TPasParser.Create(Scanner, FileResolver, SE);
     Parser:=TPasParser.Create(Scanner, FileResolver, SE);
     Parser.LogEvents:=SE.ParserLogEvents;
     Parser.LogEvents:=SE.ParserLogEvents;
     Parser.OnLog:=SE.Onlog;
     Parser.OnLog:=SE.Onlog;
-    Parser.Options:=Parser.Options+[po_AsmWhole,po_delphi,po_KeepClassForward];
+    Parser.Options:=Parser.Options+[po_AsmWhole,po_delphi,po_KeepClassForward,po_ExtConstWithoutExpr,po_AsyncProcs];
     Parser.ParseMain(Result);
     Parser.ParseMain(Result);
   finally
   finally
     Parser.Free;
     Parser.Free;