Fixes for node position in:
#nodeForMethodArg:
#primary_identifier
#primary_simpleLiteral
--- a/Parser.st Sun Aug 21 11:41:13 2011 +0200
+++ b/Parser.st Sun Aug 21 11:42:29 2011 +0200
@@ -7041,6 +7041,7 @@
]
].
].
+ pos2 := source position.
self nextToken.
].
var := VariableNode globalNamed:globlName.
@@ -7196,7 +7197,7 @@
^ node
"Modified: / 05-07-2011 / 15:10:20 / cg"
- "Modified: / 27-07-2011 / 14:03:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 20-08-2011 / 23:32:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
primary_lazyValue
@@ -7265,9 +7266,10 @@
primary_simpleLiteral
"parse a simple literal primary; return a node-tree, or raise an Error."
- |pos val|
+ |pos pos2 val|
pos := tokenPosition.
+ pos2 := source position1Based - 1.
"/
"/ ImmutableStrings are experimental
@@ -7283,7 +7285,7 @@
].
].
val := ConstantNode type: tokenType value:tokenValue
- from: pos to: source position1Based-1.
+ from: pos to: pos2.
((tokenType == #Symbol) or:[tokenType == #ESSymbol]) ifTrue:[
self markSymbolFrom:tokenPosition to:tokenPosition+tokenValue size-1.
@@ -7301,8 +7303,7 @@
].
^ val
- "Modified: / 19-07-2011 / 18:08:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 27-07-2011 / 20:04:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 21-08-2011 / 08:10:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
primary_squeakComputedArray
@@ -9052,9 +9053,9 @@
name:varName
token:var
index:varIndex)
- startPosition: tokenPosition endPosition: tokenPosition + varName size
-
- "Modified: / 27-07-2011 / 14:10:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ startPosition: tokenPosition endPosition: tokenPosition + varName size - 1
+
+ "Modified: / 21-08-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
nodeForMethodVariable:varName
@@ -10496,7 +10497,7 @@
!Parser class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.679 2011-08-01 11:53:39 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.680 2011-08-21 09:42:29 vrany Exp $'
!
version_SVN