Parser.st
changeset 1434 e7d527d493d3
parent 1432 a85ce0ec6ee4
child 1436 e345acd83456
--- a/Parser.st	Tue Jun 17 14:23:32 2003 +0200
+++ b/Parser.st	Wed Jun 18 17:36:09 2003 +0200
@@ -44,7 +44,7 @@
 !
 
 ProceedableError subclass:#ParseError
-	instanceVariableNames:'errorMessage startPosition endPosition'
+	instanceVariableNames:'errorMessage startPosition endPosition lineNumber'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:Parser
@@ -3517,7 +3517,7 @@
                     value := method 
                                 valueWithReceiver:anObject 
                                 arguments:nil  "/ (Array with:m) 
-                                selector:#doIt "/ #doIt: 
+                                selector:(requestor isNil ifTrue:#doItX ifFalse:#doIt) "/ #doIt: 
                                 search:nil
                                 sender:nil.
                 ] ifFalse:[
@@ -7334,7 +7334,13 @@
 !Parser::ParseError methodsFor:'accessing'!
 
 description
-    ^ super description , (errorMessage ? '')
+    |s|
+
+    s := super description , (errorMessage ? '').
+    lineNumber notNil ifTrue:[
+        s := s , ' [' , lineNumber asString , ']'
+    ].
+    ^ s
 !
 
 endPosition
@@ -7357,6 +7363,12 @@
     endPosition := endPositionArg.
 !
 
+lineNumber:something
+    "set the value of the instance variable 'lineNumber' (automatically generated)"
+
+    lineNumber := something.
+!
+
 parser
     ^ originator
 !
@@ -7388,7 +7400,7 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.396 2003-06-17 12:10:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.397 2003-06-18 15:35:47 cg Exp $'
 ! !
 
 Parser initialize!