*** empty log message ***
authorclaus
Sat, 18 Mar 1995 16:21:39 +0100
changeset 79 26f81a94a6ea
parent 78 e320344c19b7
child 80 101b42803846
*** empty log message ***
Parser.st
--- a/Parser.st	Sat Mar 18 06:09:18 1995 +0100
+++ b/Parser.st	Sat Mar 18 16:21:39 1995 +0100
@@ -39,7 +39,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.33 1995-03-18 05:09:18 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.34 1995-03-18 15:21:39 claus Exp $
 '!
 
 !Parser class methodsFor:'documentation'!
@@ -60,7 +60,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.33 1995-03-18 05:09:18 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.34 1995-03-18 15:21:39 claus Exp $
 "
 !
 
@@ -383,7 +383,7 @@
     parser setContext:aContext.
     parser notifying:requestor.
     parser nextToken.
-    tree := parser parseMethodBodyOrNil.
+    tree := parser parseMethodBodyOrEmpty.
 
     "if reading from a stream, backup for next expression"
     mustBackup ifTrue:[
@@ -1286,7 +1286,7 @@
     "
     |stats|
 
-    stats := self parseMethodBodyOrNil.
+    stats := self parseMethodBodyOrEmpty.
     (stats == #Error) ifFalse:[
 	(tokenType ~~ #EOF) ifTrue:[
 	    "/ just for the nicer error message
@@ -1302,7 +1302,7 @@
     ^ stats
 !
 
-parseMethodBodyOrNil
+parseMethodBodyOrEmpty
     "parse a methods body (locals & statements);
      return  a node-tree, nil or #Error. 
      empty (or comment only) input is accepted and returns nil.
@@ -1321,7 +1321,8 @@
 	primitiveNr := self parseST80Primitive.
 	(primitiveNr == #Error) ifTrue:[^ #Error].
 	primitiveNr < 0 ifTrue:[
-	    wmsg := 'ST-80 directive ignored'
+	    wmsg := 'ST-80 directive ignored'.
+	    primitiveNr := nil.
 	] ifFalse:[
 	    wmsg := 'ST-80 primitive may not work'
 	].