return tokens;
- },
+ }
/**
* findPuncToken - find the id of a token (previous to current)
n--;
}
return -1;
- },
+ }
/**
* lastSym - find the last token symbol
* need to back check syntax..
* @arg {Number} offset where to start..
* @return {Token} the token
*/
- public Token lastSym(TokenArray tokens, int n) {
+ public Token lastSym(TokenArray tokens, int n)
+ {
for (var i = n-1; i >= 0; i--) {
if (!(tokens.get(i).is("WHIT") || tokens.get(i).is("COMM"))) {
return tokens.get(i);
}
}
return null;
- },
+ }
*/
public bool read_word (TokenStream stream, TokenArray tokens) {
var found = "";
- while (!stream.look().eof && Lang.isWordChar(stream.look())) {
+ while (!stream.lookEOF() && Lang.isWordChar(stream.look())) {
found += stream.next();
}
return true;
- },
+ }
/**
@returns {Boolean} Was the token found?