ParserFlags.st
changeset 4185 e178b64ce95d
parent 4179 ad49e7852c6d
child 4238 426bf2a5a3aa
--- a/ParserFlags.st	Tue Aug 08 18:49:01 2017 +0200
+++ b/ParserFlags.st	Wed Aug 09 00:02:21 2017 +0200
@@ -57,7 +57,8 @@
 		lineNumberInfo allowSTXDelimiterComments
 		allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
 		warnAssignmentToMethodArgument warnAssignmentToPoolVariable
-		allowSignedByteArrayElements allowSymbolsStartingWithDigit'
+		allowSignedByteArrayElements allowSymbolsStartingWithDigit
+		allowJavaScriptConst'
 	classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument
 		AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
 		AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier
@@ -102,7 +103,7 @@
 		WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials
 		WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings
 		AutoDefineVariables AllowSignedByteArrayElements
-		AllowSymbolsStartingWithDigit'
+		AllowSymbolsStartingWithDigit AllowJavaScriptConst'
 	poolDictionaries:''
 	category:'System-Compiler'
 !
@@ -866,6 +867,22 @@
     "
 !
 
+allowJavaScriptConst
+    "return true, if const is allowed and treated as a keyword (in JavaScript)"
+
+    ^ AllowJavaScriptConst
+
+    "Created: / 08-08-2017 / 23:48:48 / cg"
+!
+
+allowJavaScriptConst:aBoolean
+    "true, if const is allowed and treated as a keyword (in JavaScript)"
+
+    AllowJavaScriptConst := aBoolean
+
+    "Created: / 08-08-2017 / 23:49:07 / cg"
+!
+
 allowLiteralNameSpaceSymbols
     "return true, if literal nameSpace symbols are allowed (#foo::bar) are allowed"
 
@@ -1703,6 +1720,8 @@
     "/ AllowAssignmentToPoolVariable := true.
     AllowSignedByteArrayElements := false.
     AllowSymbolsStartingWithDigit := false.
+
+    AllowJavaScriptConst := true.              
     
     ArraysAreImmutable := false.                "/ still care for ST-80 compatibility
     StringsAreImmutable := false.               "/ still care for ST-80 compatibility
@@ -1775,7 +1794,7 @@
     "
 
     "Modified: / 09-08-2006 / 18:47:18 / fm"
-    "Modified: / 18-06-2017 / 16:24:10 / cg"
+    "Modified: / 08-08-2017 / 23:49:41 / cg"
 !
 
 initializeSTCFlagsForTopDirectory:topDirArg
@@ -2371,6 +2390,18 @@
     ^ allowHashAsBinarySelector
 !
 
+allowJavaScriptConst
+    ^ allowJavaScriptConst
+
+    "Created: / 08-08-2017 / 23:50:12 / cg"
+!
+
+allowJavaScriptConst:aBoolean
+    allowJavaScriptConst := aBoolean
+
+    "Created: / 08-08-2017 / 23:50:23 / cg"
+!
+
 allowLazyValueExtension
     ^ allowLazyValueExtension
 !
@@ -3005,6 +3036,8 @@
     allowAssignmentToPoolVariable := AllowAssignmentToPoolVariable.
     allowSignedByteArrayElements := AllowSignedByteArrayElements.
     allowSymbolsStartingWithDigit := AllowSymbolsStartingWithDigit.
+
+    allowJavaScriptConst := AllowJavaScriptConst.              
     
     arraysAreImmutable := ArraysAreImmutable ? true.
     stringsAreImmutable := StringsAreImmutable ? true.
@@ -3032,7 +3065,7 @@
      self new inspect.
     "
 
-    "Modified: / 18-06-2017 / 16:25:21 / cg"
+    "Modified: / 08-08-2017 / 23:50:01 / cg"
 ! !
 
 !ParserFlags class methodsFor:'documentation'!