Parser.st
changeset 1186 014c3db76517
parent 1182 34aac67e6e72
child 1187 902d406b9100
--- a/Parser.st	Tue Sep 18 12:12:06 2001 +0200
+++ b/Parser.st	Wed Sep 19 12:56:48 2001 +0200
@@ -2047,6 +2047,12 @@
     ^ nil
 !
 
+checkForEndOfInput
+    (tokenType ~~ #EOF) ifTrue:[
+        self parseError:'nothing more expected here' position:tokenPosition to:tokenPosition.
+    ].
+!
+
 checkSelector:selector inClass:cls
     "check wether a method with selector exists in class cls an
      that the methos is not obsolete.
@@ -3313,6 +3319,7 @@
     (parseTree == #Error) ifFalse:[
         self tree:parseTree
     ].
+    self checkForEndOfInput.
     ^ parseTree
 
     "Modified: 20.4.1996 / 20:09:26 / cg"
@@ -3377,10 +3384,10 @@
     (tokenType ~~ #EOF) ifTrue:[
         stats := self statementList
     ].
-    (tokenType ~~ #EOF) ifTrue:[
-        self parseError:'nothing more expected here' position:tokenPosition to:tokenPosition.
-        ^ #Error
-    ].
+"/    (tokenType ~~ #EOF) ifTrue:[
+"/        self parseError:'nothing more expected here' position:tokenPosition to:tokenPosition.
+"/        ^ #Error
+"/    ].
     ^ stats
 
     "Modified: 27.4.1996 / 16:57:56 / cg"
@@ -5925,6 +5932,6 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.296 2001-09-11 10:21:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.297 2001-09-19 10:55:57 cg Exp $'
 ! !
 Parser initialize!