mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 23:33:33 +01:00
pastojs: set Scanner.AllowedModeSwitches
git-svn-id: trunk@35939 -
This commit is contained in:
parent
dbbeec54de
commit
89b839d341
@ -246,7 +246,6 @@ Works:
|
||||
- use 0o for octal literals
|
||||
|
||||
ToDos:
|
||||
- overload: jsvalue last,
|
||||
- constant evaluation
|
||||
- integer ranges
|
||||
- static arrays
|
||||
@ -262,6 +261,7 @@ ToDos:
|
||||
- make -Jirtl.js default for -Jc and -Tnodejs, needs #IFDEF in cfg
|
||||
- FuncName:= (instead of Result:=)
|
||||
- $modeswitch -> define <modeswitch>
|
||||
- scanner: define list of allowed modeswitches
|
||||
- $modeswitch- -> turn off
|
||||
- check memleaks
|
||||
- @@ compare method in delphi mode
|
||||
@ -779,6 +779,9 @@ type
|
||||
//------------------------------------------------------------------------------
|
||||
// TPas2JSResolver
|
||||
const
|
||||
msAllPas2jsModeSwitches = [msDelphi,msFpc,msObjfpc,
|
||||
msExternalClass,msHintDirective,msNestedComment];
|
||||
|
||||
btAllJSBaseTypes = [
|
||||
btChar,
|
||||
btString,
|
||||
|
||||
@ -652,6 +652,7 @@ begin
|
||||
FFileResolver:=TStreamResolver.Create;
|
||||
FFileResolver.OwnsStreams:=True;
|
||||
FScanner:=TPascalScanner.Create(FFileResolver);
|
||||
FScanner.AllowedModeSwitches:=msAllPas2jsModeSwitches;
|
||||
FEngine:=AddModule(Filename);
|
||||
FParser:=TTestPasParser.Create(FScanner,FFileResolver,FEngine);
|
||||
Parser.Options:=Parser.Options+po_pas2js;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user