Merge jv
authorJan Vrany <jan.vrany@labware.com>
Tue, 30 Nov 2021 18:11:10 +0000
branchjv
changeset 4734 112f76a3b1f7
parent 4733 e19fe34c0dd8 (current diff)
parent 4730 2e7755434a0f (diff)
child 4735 3b11fb3ede98
Merge
Parser.st
--- a/MessageNode.st	Mon Nov 15 20:30:42 2021 +0000
+++ b/MessageNode.st	Tue Nov 30 18:11:10 2021 +0000
@@ -1,6 +1,7 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2021 LabWare
+ COPYRIGHT (c) 2021 Patrik Svestka
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -28,6 +29,7 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2021 LabWare
+ COPYRIGHT (c) 2021 Patrik Svestka
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -402,6 +404,7 @@
     ].
 
     startPosition := receiver startPosition.
+    endPosition := receiver endPosition.
 
     "/ create the symbol only, if the symbol is already known in the system.
     "/ otherwise a lot of partial symbols will be created by the SyntaxHighlighter
@@ -429,6 +432,7 @@
     "Modified: / 02-07-1997 / 17:01:24 / cg"
     "Modified: / 08-05-2012 / 17:07:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 19-07-2018 / 14:09:59 / Stefan Vogel"
+    "Modified: / 23-11-2021 / 10:24:10 / Patrik Svestka <patrik.svestka@gmail.com>"
 !
 
 selector
@@ -1251,6 +1255,7 @@
     ]
 ! !
 
+
 !MessageNode methodsFor:'evaluation'!
 
 evaluateForCascadeIn:anEnvironment
@@ -1336,6 +1341,7 @@
     ^ selector asSymbol
 ! !
 
+
 !MessageNode methodsFor:'optimized code generation'!
 
 codeAndIfElseOn:aStream inBlock:b valueNeeded:valueNeeded for:aCompiler
--- a/Parser.st	Mon Nov 15 20:30:42 2021 +0000
+++ b/Parser.st	Tue Nov 30 18:11:10 2021 +0000
@@ -2,6 +2,7 @@
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2015-2017 Jan Vrany
  COPYRIGHT (c) 2020-2021 LabWare
+ COPYRIGHT (c) 2021 Patrik Svestka
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -176,6 +177,7 @@
  COPYRIGHT (c) 1989 by Claus Gittinger
  COPYRIGHT (c) 2015-2017 Jan Vrany
  COPYRIGHT (c) 2020-2021 LabWare
+ COPYRIGHT (c) 2021 Patrik Svestka
               All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -7564,6 +7566,7 @@
     "Modified: / 08-08-2017 / 17:06:12 / cg"
     "Modified: / 09-08-2017 / 14:46:56 / mawalch"
     "Modified: / 20-03-2019 / 20:53:30 / Claus Gittinger"
+    "Modified (format): / 23-11-2021 / 10:36:08 / Patrik Svestka <patrik.svestka@gmail.com>"
 !
 
 functionCallArgList
@@ -9615,11 +9618,12 @@
     |receiver|
 
     (parserFlags allowArrayIndexSyntaxExtension 
-    or:[ parserFlags allowFunctionCallSyntaxForBlockEvaluation ]) ifFalse:[
-        receiver := self primary
-    ] ifTrue:[    
-        receiver := self arrayIndexingExpression.
-    ].
+    or:[ parserFlags allowFunctionCallSyntaxForBlockEvaluation ]) ifTrue:[    
+        receiver := self arrayIndexingExpression
+    ] ifFalse: [
+        receiver := self primary 
+    ].
+    
     (receiver == #Error) ifTrue:[^ #Error].
 "/    (tokenType == #EOF) ifTrue:[^ receiver].
 "/    tokenType == $] ifTrue:[^ receiver].
@@ -9630,6 +9634,7 @@
     ^ self unaryExpressionFor:receiver
 
     "Modified: / 08-08-2017 / 17:02:26 / cg"
+    "Modified: / 23-11-2021 / 10:45:57 / Patrik Svestka <patrik.svestka@gmail.com>"
 !
 
 unaryExpressionFor:receiverArg
@@ -9727,7 +9732,7 @@
 
     v := self variableOrError:tokenName.
     (v ~~ #Error) ifTrue:[
-        (v isMemberOf:VariableNode) ifTrue:[
+        v isVariable ifTrue:[
             self markVariable:v.
         ].
         ^ v
@@ -9791,11 +9796,12 @@
 
 "/    self markGlobalIdentifierFrom:pos1 to:pos2.
     ^ (VariableNode globalNamed:tokenName)
-        startPosition:pos1 endPosition:pos2
+        startPosition:pos1 endPosition:pos2; line: lineNr; yourself
 
     "Modified: / 25-08-2011 / 11:57:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 22-06-2017 / 06:57:11 / cg"
     "Modified: / 23-09-2021 / 14:41:41 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified (format): / 24-11-2021 / 10:45:42 / Patrik Svestka <patrik.svestka@gmail.com>"
 !
 
 variableOrError
@@ -10061,7 +10067,7 @@
     tokenSymbol notNil ifTrue:[
         (Smalltalk includesKey:tokenSymbol) ifTrue:[
             parseForCode ifFalse:[self rememberGlobalUsed:varName].
-            ^ (VariableNode globalNamed:tokenSymbol) startPosition:tokenPosition endPosition:endPosition
+            ^ (VariableNode globalNamed:tokenSymbol) startPosition:tokenPosition endPosition:endPosition; line: lineNr; yourself
         ]
     ].
 
@@ -10104,11 +10110,9 @@
     "Modified: / 05-10-2011 / 15:25:20 / az"
     "Modified (format): / 04-12-2018 / 11:28:12 / Stefan Vogel"
     "Modified: / 08-06-2019 / 18:27:36 / Claus Gittinger"
-    "Modified (format): / 04-12-2018 / 11:28:12 / Stefan Vogel"
-    "Modified: / 08-06-2019 / 18:27:36 / Claus Gittinger"
-    "Modified: / 16-12-2020 / 16:17:37 / Jan Vrany <jan.vrany@labware.com>"
     "Modified: / 09-05-2020 / 13:22:04 / cg"
     "Modified: / 24-06-2021 / 17:32:22 / Jan Vrany <jan.vrany@labware.com>"
+    "Modified: / 24-11-2021 / 10:33:53 / Patrik Svestka <patrik.svestka@gmail.com>"
 ! !
 
 !Parser methodsFor:'parsing-primitives & pragmas'!
--- a/PrimaryNode.st	Mon Nov 15 20:30:42 2021 +0000
+++ b/PrimaryNode.st	Tue Nov 30 18:11:10 2021 +0000
@@ -1,5 +1,6 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
+ COPYRIGHT (c) 2021 Patrik Svestka
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -25,6 +26,7 @@
 copyright
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
+ COPYRIGHT (c) 2021 Patrik Svestka
 	      All Rights Reserved
 
  This software is furnished under a license and may be used
@@ -66,6 +68,15 @@
     line := something.
 !
 
+lineNumber
+
+    "Compatibility"
+
+    ^ self line
+
+    "Created: / 24-11-2021 / 10:02:30 / Patrik Svestka <patrik.svestka@gmail.com>"
+!
+
 type:t value:val
     type := t.
     value := val
@@ -173,6 +184,11 @@
     ^ '$Header$'
 !
 
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+!
+
 version_SVN
     ^ '$ Id $'
 ! !