Parser.st
branchjv
changeset 4732 38b211e486e1
parent 4731 c8777a733b0f
child 4734 112f76a3b1f7
--- a/Parser.st	Thu Sep 23 14:56:59 2021 +0100
+++ b/Parser.st	Wed Oct 06 12:11:13 2021 +0100
@@ -8322,6 +8322,13 @@
 
     ].
 
+    (tokenType == $_ and: [ parserFlags allowUnderscoreInIdentifier ]) ifTrue: [
+        "/ Allow single underscore to be a valid variable name (Pharo allows 
+        "/ that and some code uses this feature)
+        tokenName := tokenValue := '_'.
+        ^ self primary_identifier.
+    ].
+
     self syntaxError:eMsg position:startPos to:endPos.
     ^ #Error
 
@@ -8330,7 +8337,7 @@
     "Modified: / 26-07-2012 / 11:35:46 / cg"
     "Modified: / 21-06-2019 / 10:06:11 / Claus Gittinger"
     "Modified: / 24-09-2019 / 11:46:31 / Stefan Vogel"
-    "Modified: / 23-09-2021 / 14:49:46 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified (format): / 06-10-2021 / 12:08:58 / Jan Vrany <jan.vrany@labware.com>"
 !
 
 primary_dolphinComputedLiteral