Parser.st
changeset 668 8cc13d42d244
parent 664 63d1460e8ee3
child 670 7358611ae2a7
--- a/Parser.st	Wed Apr 01 11:20:08 1998 +0200
+++ b/Parser.st	Wed Apr 01 11:21:33 1998 +0200
@@ -2698,27 +2698,28 @@
 
     lno := tokenLineNr.
     (tokenType == $| ) ifTrue:[
-	self nextToken.
-	[tokenType == $|] whileFalse:[
-	    (tokenType == #Identifier) ifFalse:[
-		^ self identifierExpectedIn:'block-var declaration'
-	    ].
-	    var := Variable name:tokenName.
-	    vars isNil ifTrue:[
-		vars := Array with:var.
-		names := Array with:tokenName
-	    ] ifFalse:[
-		(names includes:tokenName) ifTrue:[
-		    self parseError:'redefinition of ''' , tokenName , ''' in local variables'
-			   position:tokenPosition to:tokenPosition + tokenName size -1.
-		] ifFalse:[
-		    vars := vars copyWith:var.
-		    names := names copyWith:tokenName
-		]
-	    ].
-	    self nextToken.
-	].
-	self nextToken
+        self nextToken.
+        [tokenType == $|] whileFalse:[
+            (tokenType == #Identifier) ifFalse:[
+                ^ self identifierExpectedIn:'block-var declaration'
+            ].
+            self markLocalIdentifierFrom:tokenPosition to:(tokenPosition + tokenName size - 1).
+            var := Variable name:tokenName.
+            vars isNil ifTrue:[
+                vars := Array with:var.
+                names := Array with:tokenName
+            ] ifFalse:[
+                (names includes:tokenName) ifTrue:[
+                    self parseError:'redefinition of ''' , tokenName , ''' in local variables'
+                           position:tokenPosition to:tokenPosition + tokenName size -1.
+                ] ifFalse:[
+                    vars := vars copyWith:var.
+                    names := names copyWith:tokenName
+                ]
+            ].
+            self nextToken.
+        ].
+        self nextToken
     ].
 
     node := BlockNode arguments:args home:currentBlock variables:vars.
@@ -2726,14 +2727,14 @@
     currentBlock := node.
     stats := self blockStatementList.
     lineNumberInfo == #full ifTrue:[
-	node endLineNumber:tokenLineNr
+        node endLineNumber:tokenLineNr
     ].
     node statements:stats.
     currentBlock := node home.
     (stats == #Error) ifTrue:[^ #Error].
     ^ node
 
-    "Modified: 21.10.1996 / 14:48:56 / cg"
+    "Modified: / 31.3.1998 / 22:46:09 / cg"
 !
 
 blockExpression
@@ -4606,6 +4607,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.158 1998-03-31 17:55:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.159 1998-04-01 09:21:33 cg Exp $'
 ! !
 Parser initialize!