Parser.st
changeset 1165 09d40e1ff75d
parent 1164 cc5e06212815
child 1167 34f58eacdbda
--- a/Parser.st	Sun Jul 29 12:29:18 2001 +0200
+++ b/Parser.st	Mon Jul 30 16:12:44 2001 +0200
@@ -3851,11 +3851,8 @@
     pos1 := tokenPosition.
     elements := OrderedCollection new:20.
     [tokenType ~~ $) ] whileTrue:[
-        ParseErrorSignal handle:[:ex |
-            ^ #Error
-        ] do:[
-            elem := self arrayConstant.
-        ].
+        elem := self arrayConstant.
+
 "/        (elem == #Error) ifTrue:[
 "/            (tokenType == #EOF) ifTrue:[
 "/                self syntaxError:'unterminated array-constant; '')'' expected' 
@@ -3877,8 +3874,6 @@
     ^ arr
 
     "Modified: / 14.4.1998 / 17:03:29 / cg"
-
-
 !
 
 arrayConstant
@@ -3952,6 +3947,7 @@
     ].
     (tokenType == #EOF) ifTrue:[
         "just for the better error-hilight; let caller handle error"
+        self syntaxError:'error in array-constant; EOF unexpected'. 
         ^ ParseErrorSignal raise.
     ].
     self syntaxError:('error in array-constant; ' 
@@ -4683,7 +4679,11 @@
 
     (tokenType == #HashLeftParen) ifTrue:[
         self nextToken.
-        val := self array.
+        ParseErrorSignal handle:[:ex |
+            ^ #Error
+        ] do:[
+            val := self array.
+        ].
         self nextToken.
         (self noAssignmentAllowed:'assignment to a constant' at:pos) ifFalse:[
             ^ #Error
@@ -5833,6 +5833,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.288 2001-07-29 10:29:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.289 2001-07-30 14:12:44 cg Exp $'
 ! !
 Parser initialize!