java.lang.Object
com.trapezium.javascript.Token
- class Token
- extends java.lang.Object
|
Field Summary |
(package private) int |
offset
|
(package private) boolean |
possibleEnd
Does a character end a particular token, used for currentToken. |
(package private) int |
type
|
|
Constructor Summary |
Token(int type,
int offset)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
int type
offset
int offset
possibleEnd
boolean possibleEnd
- Does a character end a particular token, used for currentToken.
Only the following tokens can ever be assigned as currentToken:
JS_COMMENT -- all characters OK for rest of line
JS_MULTILINECOMMENT -- characters OK up to C style comment end
JS_NAME -- any non digit, non-number, non underscore
All other tokens we arbitrarily end immediately.
Token
public Token(int type,
int offset)
endToken
public boolean endToken(char x)