Explorar o código

* 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 %!s(int64=4) %!d(string=hai) anos
pai
achega
161e7862e7
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  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"/>
     </PublishOptions>
     <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"/>
       <Modes Count="1">
         <Mode0 Name="default">

+ 2 - 2
utils/pas2js/stubcreator.pp

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