#FEATURE by cg
class: ParserFlags
class definition
added:
#allowSymbolsStartingWithDigit
#allowSymbolsStartingWithDigit:
changed: #initialize
class: ParserFlags class
added:
#allowSymbolsStartingWithDigit
#allowSymbolsStartingWithDigit:
changed: #initialize
--- a/ParserFlags.st Sat Jun 17 03:10:21 2017 +0200
+++ b/ParserFlags.st Sun Jun 18 16:26:36 2017 +0200
@@ -57,7 +57,7 @@
lineNumberInfo allowSTXDelimiterComments
allowSTXExtendedArrayLiterals warnAssignmentToBlockArgument
warnAssignmentToMethodArgument warnAssignmentToPoolVariable
- allowSignedByteArrayElements'
+ allowSignedByteArrayElements allowSymbolsStartingWithDigit'
classVariableNames:'AllowArrayIndexSyntaxExtension AllowAssignmentToBlockArgument
AllowAssignmentToMethodArgument AllowAssignmentToPoolVariable
AllowCaretAsBinop AllowCharacterEscapes AllowDollarInIdentifier
@@ -101,7 +101,8 @@
WarnParagraphInIdentifier WarnPlausibilityChecks
WarnPossibleIncompatibilities WarnST80Directives WarnSTXSpecials
WarnUndeclared WarnUnderscoreInIdentifier WarnUnusedVars Warnings
- AutoDefineVariables AllowSignedByteArrayElements'
+ AutoDefineVariables AllowSignedByteArrayElements
+ AllowSymbolsStartingWithDigit'
poolDictionaries:''
category:'System-Compiler'
!
@@ -1153,6 +1154,26 @@
AllowSqueakPrimitives := aBoolean
!
+allowSymbolsStartingWithDigit
+ "return true, if a symbol is allowed to start with a digit
+ i.e. as in #2D.
+ This seems to be ok in new Squeak/Pharo versions"
+
+ ^ AllowSymbolsStartingWithDigit
+
+ "Created: / 18-06-2017 / 16:23:20 / cg"
+!
+
+allowSymbolsStartingWithDigit:aBoolean
+ "controls if a symbol is allowed to start with a digit
+ i.e. as in #2D.
+ This seems to be ok in new Squeak/Pharo versions"
+
+ AllowSymbolsStartingWithDigit := aBoolean
+
+ "Created: / 18-06-2017 / 16:24:47 / cg"
+!
+
allowUnderscoreInIdentifier
"return true, if underscores are allowed in identifiers"
@@ -1679,7 +1700,8 @@
AllowAssignmentToPoolVariable := false.
"/ AllowAssignmentToPoolVariable := true.
AllowSignedByteArrayElements := false.
-
+ AllowSymbolsStartingWithDigit := false.
+
ArraysAreImmutable := false. "/ still care for ST-80 compatibility
StringsAreImmutable := false. "/ still care for ST-80 compatibility
"/ ArraysAreImmutable := true. "/ do not care for ST-80 compatibility
@@ -1751,7 +1773,7 @@
"
"Modified: / 09-08-2006 / 18:47:18 / fm"
- "Modified: / 16-11-2016 / 22:32:03 / cg"
+ "Modified: / 18-06-2017 / 16:24:10 / cg"
!
initializeSTCFlagsForTopDirectory:topDirArg
@@ -2535,6 +2557,26 @@
allowStringEscapes := aBoolean.
!
+allowSymbolsStartingWithDigit
+ "return true, if a symbol is allowed to start with a digit
+ i.e. as in #2D.
+ This seems to be ok in new Squeak/Pharo versions"
+
+ ^ allowSymbolsStartingWithDigit
+
+ "Created: / 18-06-2017 / 16:26:08 / cg"
+!
+
+allowSymbolsStartingWithDigit:aBoolean
+ "control if a symbol is allowed to start with a digit
+ i.e. as in #2D.
+ This seems to be ok in new Squeak/Pharo versions"
+
+ allowSymbolsStartingWithDigit := aBoolean
+
+ "Created: / 18-06-2017 / 16:26:23 / cg"
+!
+
allowUnderscoreInIdentifier
^ allowUnderscoreInIdentifier
!
@@ -2956,7 +2998,8 @@
allowAssignmentToMethodArgument := AllowAssignmentToMethodArgument.
allowAssignmentToPoolVariable := AllowAssignmentToPoolVariable.
allowSignedByteArrayElements := AllowSignedByteArrayElements.
-
+ allowSymbolsStartingWithDigit := AllowSymbolsStartingWithDigit.
+
arraysAreImmutable := ArraysAreImmutable ? true.
stringsAreImmutable := StringsAreImmutable ? true.
implicitSelfSends := ImplicitSelfSends ? false.
@@ -2983,7 +3026,7 @@
self new inspect.
"
- "Modified: / 16-11-2016 / 22:32:37 / cg"
+ "Modified: / 18-06-2017 / 16:25:21 / cg"
! !
!ParserFlags class methodsFor:'documentation'!