Scanner.st
changeset 1948 40baccddc2f6
parent 1930 ff11ddb6de58
child 1949 709ca062cf98
--- a/Scanner.st	Thu Nov 16 14:44:02 2006 +0100
+++ b/Scanner.st	Thu Nov 16 14:44:14 2006 +0100
@@ -1281,13 +1281,11 @@
     |position|
 
     tokenLineNr := lNr.
-    (requestor notNil and:[requestor isTextView]) ifTrue:[
-        position := requestor characterPositionOfLine:lNr col:1.
-        ^ self parseError:aMessage position:position to:nil
-    ].
-    ^ self parseError:aMessage position:nil to:nil
-
-    "Created: / 13.5.1998 / 16:45:05 / cg"
+    position := self positionFromLineNumber:lNr.
+    ^ self parseError:aMessage position:position to:nil
+
+    "Created: / 13-05-1998 / 16:45:05 / cg"
+    "Modified: / 16-11-2006 / 14:29:00 / cg"
 !
 
 parseError:aMessage position:position
@@ -1314,6 +1312,17 @@
     "Modified: / 22-08-2006 / 14:13:11 / cg"
 !
 
+positionFromLineNumber:lNr
+    |position|
+
+    (requestor notNil and:[requestor isTextView]) ifTrue:[
+        ^ requestor characterPositionOfLine:lNr col:1.
+    ].
+    ^ nil
+
+    "Created: / 16-11-2006 / 14:28:37 / cg"
+!
+
 showErrorMessage:aMessage position:pos
     "show an errormessage on the Transcript"
 
@@ -1489,6 +1498,17 @@
         position:position to:endPos
 !
 
+warning:aMessage line:lNr
+    "a warning - only start position is known"
+
+    |position|
+
+    position := self positionFromLineNumber:lNr.
+    ^ self warning:aMessage position:position to:nil
+
+    "Created: / 16-11-2006 / 14:29:30 / cg"
+!
+
 warning:aMessage position:position
     "a warning - only start position is known"
 
@@ -3113,7 +3133,7 @@
 !Scanner class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.224 2006-10-19 09:36:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.225 2006-11-16 13:44:14 cg Exp $'
 ! !
 
 Scanner initialize!