--- a/Scanner.st Tue Aug 22 15:48:14 2000 +0200
+++ b/Scanner.st Wed Aug 23 13:39:28 2000 +0200
@@ -10,6 +10,8 @@
hereby transferred.
"
+"{ Package: 'stx:libcomp' }"
+
Object subclass:#Scanner
instanceVariableNames:'typeArray actionArray source lineNr token tokenType tokenPosition
tokenValue tokenName tokenLineNr hereChar peekChar peekChar2
@@ -798,6 +800,10 @@
"Created: / 19.1.2000 / 16:28:03 / cg"
!
+errorMessagePrefix
+ ^ 'Error:'
+!
+
lastTokenLineNumber
"return the line number of the token which was just read."
@@ -862,7 +868,7 @@
|m|
errorFlag := true.
- m := 'Error: ' , (aMessage ? '???').
+ m := (self errorMessagePrefix) , ' ' , (aMessage ? '???').
self notifyError:m position:position to:endPos.
exitBlock notNil ifTrue:[exitBlock value].
^ false
@@ -898,7 +904,7 @@
syntaxError:aMessage position:position to:endPos
"a syntax error happened"
- self notifyError:('Error:' , aMessage) position:position to:endPos.
+ self notifyError:((self errorMessagePrefix) , ' ' , aMessage) position:position to:endPos.
exitBlock notNil ifTrue:[exitBlock value].
^ false
!
@@ -1011,7 +1017,11 @@
warning:aMessage position:position to:endPos
"a warning"
- ^ self notifyWarning:('Warning: ' , aMessage) position:position to:endPos
+ ^ self notifyWarning:((self warningMessagePrefix) , ' ' , aMessage) position:position to:endPos
+!
+
+warningMessagePrefix
+ ^ 'Warning:'
! !
!Scanner methodsFor:'general scanning'!
@@ -2102,6 +2112,6 @@
!Scanner class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.118 2000-02-01 11:23:54 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.119 2000-08-23 11:39:28 cg Exp $'
! !
Scanner initialize!