--- a/Scanner.st Wed Apr 01 13:10:59 1998 +0200
+++ b/Scanner.st Wed Apr 01 13:11:59 1998 +0200
@@ -589,9 +589,19 @@
"Created: / 31.3.1998 / 13:34:45 / cg"
!
+markConstantFrom:pos1 to:pos2
+
+ "Created: / 1.4.1998 / 13:02:56 / cg"
+!
+
markStringFrom:pos1 to:pos2
"Created: / 31.3.1998 / 16:37:18 / cg"
+!
+
+markSymbolFrom:pos1 to:pos2
+
+ "Created: / 1.4.1998 / 12:58:42 / cg"
! !
!Scanner methodsFor:'error handling'!
@@ -945,13 +955,14 @@
nextChar := source next.
nextChar notNil ifTrue:[
tokenValue := token := nextChar.
- tokenType := #Character
+ tokenType := #Character.
+"/ self markConstantFrom:tokenPosition to:(tokenPosition + 1).
] ifFalse:[
tokenType := #EOF
].
^ tokenType
- "Modified: 20.6.1997 / 17:51:39 / cg"
+ "Modified: / 1.4.1998 / 13:06:33 / cg"
!
nextColonOrAssign
@@ -1021,6 +1032,7 @@
].
].
(nextChar == $:) ifFalse:[
+ self markSymbolFrom:tokenPosition to:(source position-1).
tokenValue := token := string asSymbol.
tokenType := #Symbol.
^ tokenType
@@ -1050,6 +1062,7 @@
"it seems that ST-80 supports arbitrary symbols as #'...'
(seen in a PD program)"
self nextString.
+ self markSymbolFrom:tokenPosition to:(source position-1).
tokenValue := token := tokenValue asSymbol.
tokenType := #Symbol.
^ tokenType
@@ -1063,6 +1076,7 @@
string := string copyWith:nextChar
]
].
+ self markSymbolFrom:tokenPosition to:(source position-1).
tokenValue := token := string asSymbol.
tokenType := #Symbol.
^ tokenType
@@ -1079,8 +1093,9 @@
position:tokenPosition to:(tokenPosition + 1).
^ #Error
"
+.
- "Modified: 14.10.1997 / 17:14:56 / cg"
+ "Modified: / 1.4.1998 / 13:02:45 / cg"
!
nextId
@@ -1295,9 +1310,10 @@
] ifFalse:[
tokenType := #Integer
].
+"/ self markConstantFrom:tokenPosition to:(source position - 1).
^ tokenType
- "Modified: / 5.3.1998 / 02:54:36 / cg"
+ "Modified: / 1.4.1998 / 13:06:28 / cg"
!
nextPrimitive
@@ -1700,6 +1716,6 @@
!Scanner class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.78 1998-04-01 09:19:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/Scanner.st,v 1.79 1998-04-01 11:11:59 cg Exp $'
! !
Scanner initialize!