[squeak-dev] The Trunk: Compiler-ul.209.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jun 10 21:11:19 UTC 2011
Levente Uzonyi uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-ul.209.mcz
==================== Summary ====================
Name: Compiler-ul.209
Author: ul
Time: 10 June 2011, 11:10:15.285 pm
UUID: e3f8ac39-c1bb-7b43-ba44-8447113e2649
Ancestors: Compiler-ul.208
Added the missing class variable AllowBlockArgumentAssignment.
=============== Diff against Compiler-ul.208 ===============
Item was changed:
Object subclass: #Scanner
instanceVariableNames: 'source mark hereChar aheadChar token tokenType currentComment buffer typeTable'
+ classVariableNames: 'AllowBlockArgumentAssignment AllowUnderscoreAssignments AllowUnderscoreSelectors DoItCharacter TypeTable'
- classVariableNames: 'AllowUnderscoreAssignments AllowUnderscoreSelectors DoItCharacter TypeTable'
poolDictionaries: ''
category: 'Compiler-Kernel'!
!Scanner commentStamp: 'ul 4/3/2011 02:04' prior: 0!
I scan a string or text, picking out Smalltalk syntactic tokens. I look one character ahead. I put each token found into the instance variable, token, and its type (a Symbol) into the variable, tokenType. At the end of the input stream, I pretend to see an endless sequence of special characters called doIts.
Instance Variables
aheadChar: <Character>
buffer: <WriteStream>
currentComment: <OrderedCollection>
hereChar: <Character>
mark: <Integer>
source: <ReadStream>
token: <Symbol|String|NumberCharacter|Boolean|nil>
tokenType: <Symbol>
typeTable: <Array>
aheadChar
- the next character in the input stream
buffer
- a reusable WriteStream on a String which is used for building strings. Shouldn't be used from multiple methods without resetting.
currentComment
- an OrderedCollection of strings which contain all comments between the current token and the previous token or the beginning of the source.
hereChar
- the current character
mark
- the position of the current token in the source stream
source
- the input stream of characters
token
- the current token
tokenType
- the type of the current token. The possible token types are: #binary, #character, #colon, #doIt, #keyword, #leftArrow, #leftBrace, #leftBracket, #leftParenthesis, #literal, #period, #rightBrace, #rightBracket, #rightParenthesis, #semicolon, #string, #upArrow, #verticalBar, #word, #xBinary, #xColon, #xDelimiter, #xDigit, #xDollar, #xDoubleQuote, #xLetter, #xLitQuote, #xSingleQuote, #xUnderscore
typeTable
- an array that maps each an evaluable tokenType to each character with asciiValue between 0 and 255!
More information about the Squeak-dev
mailing list
|