if (considerWhitespace == true) {
- if (this.cursor+n < 0 || this.cursor+n > (this.tokens.length -1)) {
+ if (this.cursor+n < 0 || this.cursor+n > (this.tokens.size -1)) {
return new Token("", "VOID", "START_OF_STREAM");
}
return this.tokens.get(this.cursor+n);
if (i < 0) {
return new Token("", "VOID", "START_OF_STREAM");
}
- if (i > this.tokens.length) {
+ if (i > this.tokens.size) {
return new Token("", "VOID", "END_OF_STREAM");
}
}
- public int lookFor : function (data)
+ public int lookFor (string data)
{
// non tree version..
var i = this.cursor < 0 ? 0 : this.cursor ;
while (true) {
- if (i >= this.tokens.length) return -1;
+ if (i >= this.tokens.size) {
+ return -1;
+ }
if (this.tokens[i].data == data) {
return i;
}