Browse Source

pas2js: allow $ScopedEnums

git-svn-id: trunk@37817 -
Mattias Gaertner 7 years ago
parent
commit
3b37083979
2 changed files with 2 additions and 1 deletions
  1. 1 1
      utils/pas2js/docs/translation.html
  2. 1 0
      utils/pas2js/pas2jscompiler.pp

+ 1 - 1
utils/pas2js/docs/translation.html

@@ -2523,6 +2523,7 @@ End.
     <li>{$NOTE text}</li>
     <li>{$HINT text}</li>
     <li>{$M+}, {$TypeInfo on}: switches default visibility for class members from public to published</li>
+    <li>{$ScopedEnums on|off} disabled/default: propagate enums to global scope, enable: needs fqn e.g. TEnumType.EnumValue.</li>
     </ul>
     Defines:
     <ul>
@@ -2616,7 +2617,6 @@ End.
     <li>Runtime checks: Overflow -Co, $Q</li>
     <li>Runtime checks: Range -Cr, $R</li>
     <li>Runtime checks: Typecast -CR</li>
-    <li>Scoped enums</li>
     <li>Set of char, boolean, custom range</li>
     <li>Type alias, e.g. type TTranslateString = type string;</li>
     <li>Variant records</li>

+ 1 - 0
utils/pas2js/pas2jscompiler.pp

@@ -699,6 +699,7 @@ begin
   Scanner.AllowedModeSwitches:=msAllPas2jsModeSwitches;
   Scanner.ReadOnlyModeSwitches:=msAllPas2jsModeSwitchesReadOnly;
   Scanner.CurrentModeSwitches:=p2jsMode_SwitchSets[Compiler.Mode];
+  Scanner.AllowedBoolSwitches:=msAllPas2jsBoolSwitches;
   // Note: some Scanner.Options are set by TPasResolver
   for i:=0 to Compiler.Defines.Count-1 do
     begin