}
return null;
}
- public Token? lastSym = function() {
+ public Token? lastSym () {
for (var i = this.tokens.length-1; i >= 0; i--) {
if (!(this.tokens.get(i).is("WHIT") || this.tokens.get(i).is("COMM"))) {
return this.tokens.get(i);
}
return null;
}
+ public void push (Token t) {
+ this.tokens.add(t);
+ }
}
if (this.read_word(stream, tokens)) continue;
// if execution reaches here then an error has happened
- tokens.push(new Token(stream.next(), "TOKN", "UNKNOWN_TOKEN", this.line));
+ tokens.push(
+ new Token(stream.next(), "TOKN", "UNKNOWN_TOKEN", this.line)
+ );
}