//Seed.print("STOP:" + stop);
while ((token = this.look())) {
if (token.is(start)) {
+ // Seed.print("balance: START : " + depth + " " + token.data);
depth++;
started = true;
}
if (token.is(stop)) {
depth--;
- if (depth == 0) return got;
+ // Seed.print("balance: STOP: " + depth + " " + token.data);
+ if (depth < 0) return got;
}
if (!this.next()) break;
}
end = Math.min(end || this.tokens.length, this.tokens.length);
var out='';
for (var i =start;i < end; i++) {
- out += this.tokens[i].toString();
+ out += this.tokens[i].data;
};
print(out);
}