--- a/Parser.st Mon Aug 01 13:53:09 2011 +0200
+++ b/Parser.st Mon Aug 01 13:53:39 2011 +0200
@@ -4750,6 +4750,7 @@
"ST-80 allows [:arg ]"
(tokenType == $] ) ifTrue:[
node := BlockNode arguments:args home:currentBlock variables:nil.
+ node startPosition: startPos endPosition: tokenPosition.
node lineNumber:lno.
self markBlockFrom:startPos to:tokenPosition.
"/ self nextToken. -- should be done & removed in caller
@@ -4772,6 +4773,7 @@
^ self blockNodeRewriteHookFor:node
"Modified (comment): / 05-07-2011 / 23:23:08 / cg"
+ "Modified: / 01-08-2011 / 12:34:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
blockBody:args
@@ -5446,8 +5448,9 @@
(tokenType == #Primitive) ifTrue:[
code := tokenValue.
+ node := PrimitiveNode code:code.
+ node startPosition: tokenPosition endPosition: source position1Based.
self nextToken.
- node := PrimitiveNode code:code.
node isOptional ifFalse:[
hasNonOptionalPrimitiveCode := true
].
@@ -5492,6 +5495,7 @@
^ node
"Modified: / 05-07-2011 / 21:22:31 / cg"
+ "Modified: / 01-08-2011 / 12:03:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
statementList
@@ -6651,8 +6655,9 @@
].
(tokenType == #Primitive) ifTrue:[
+ node := PrimitiveNode code:tokenValue.
+ node startPosition: tokenPosition endPosition: source position1Based.
self nextToken.
- node := PrimitiveNode code:tokenValue.
hasNonOptionalPrimitiveCode := true.
hasPrimitiveCode := true.
^ node
@@ -6747,7 +6752,7 @@
"Created: / 13-09-1995 / 12:50:50 / claus"
"Modified: / 05-07-2011 / 23:22:29 / cg"
- "Modified: / 27-07-2011 / 20:04:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 01-08-2011 / 12:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
primary_dolphinComputedLiteral
@@ -8799,6 +8804,7 @@
|numEl arrRec sel expr|
arrRec := VariableNode globalNamed:#Array.
+ arrRec startPosition: -1 endPosition: -1. "/ -1 means artifitial node
numEl := elementExpressions size.
@@ -8824,7 +8830,7 @@
expr := MessageNode
receiver:arrRec
selector:#new:
- arg:(ConstantNode type:#Integer value:numEl).
+ arg:(ConstantNode type:#Integer value:numEl from: -1 to: -1). "/ -1 means artifitial node
numEl == 0 ifTrue:[
^ expr.
@@ -8834,7 +8840,7 @@
expr := (idx == 1 ifTrue:[MessageNode] ifFalse:[CascadeNode])
receiver:expr
selector:#at:put:
- arg1:(ConstantNode type:#Integer value:idx)
+ arg1:(ConstantNode type:#Integer value:idx from: -1 to:-1)"/ -1 means artifitial node
arg2:e
fold:false.
].
@@ -8843,6 +8849,8 @@
receiver:expr
selector:#yourself.
^ expr
+
+ "Modified: / 01-08-2011 / 12:38:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
inWhichClassIsClassInstVar:aString
@@ -10488,7 +10496,7 @@
!Parser class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.678 2011-07-28 15:05:36 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.679 2011-08-01 11:53:39 vrany Exp $'
!
version_SVN