Parser.st
changeset 4431 5cbe584d6f60
parent 4429 13faa6fe3a82
child 4439 26f65f9d583e
--- a/Parser.st	Mon Jun 03 11:13:19 2019 +0200
+++ b/Parser.st	Mon Jun 03 11:23:03 2019 +0200
@@ -7914,6 +7914,7 @@
         ^ self primary_dolphinComputedLiteral.
     ].
     tokenType == #ExclaLeftBrack ifTrue:[
+        "/ !![ ... ] generates a lazy value        
         self nextToken.
         parserFlags allowLazyValueExtension == true ifFalse:[
             self parseError:'non-Standard LazyValue extension. Enable allowLazyValueExtension in parserFlags.' position:pos to:tokenPosition.
@@ -8005,6 +8006,15 @@
     (tokenType == #StringFragment) ifTrue:[
         ^ self stringWithEmbeddedExpressions
     ].    
+    (tokenType == #RegexString) ifTrue:[
+        |s const expr|
+
+        s := self makeImmutableString:tokenValue.
+        const := ConstantNode type:#String value:s from:tokenPosition to:tokenLastEndPosition.
+        expr := MessageNode receiver:const selector:#'asRegex'.
+        self nextToken.
+        ^ expr
+    ].    
     
     (tokenType == #Error) ifTrue:[^ #Error].
 
@@ -8036,7 +8046,7 @@
     "Created: / 13-09-1995 / 12:50:50 / claus"
     "Modified: / 01-08-2011 / 12:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 26-07-2012 / 11:35:46 / cg"
-    "Modified: / 03-06-2019 / 10:56:33 / Claus Gittinger"
+    "Modified: / 03-06-2019 / 11:21:06 / Claus Gittinger"
 !
 
 primary_dolphinComputedLiteral