readLiteral | node |
tokenType = $$
ifTrue: [ node <- self currentChar.
self nextChar. self nextLex. ^ node ].
tokenType isDigit
ifTrue: [ ^ self readInteger ].
tokenType = $-
ifTrue: [ self nextLex. ^ self readInteger negated ].
tokenType = $'
ifTrue: [ ^ self readString ].
self error: 'invalid literal:' + token