}
- if (this.mode == "BUILDING_SYMBOL_TREE") {
- identifier = scope.getIdentifier(token.data,token) ;
+ if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) {
+ var identifier = scope.getIdentifier(token.data,token) ;
if (identifier == false) {
scope.declareIdentifier(token.data, token);
} else {
token.identifier = identifier;
- this.warn("(SCOPE) The variable " + token.data + ' (line:' + token.line + ") has already been declared in the same scope...");
+ this.warn("(SCOPE) The variable " + token.data + " (line:" + token.line + ") has already been declared in the same scope...");
}
}
token = this.ts.nextTok();
- !this.debug|| print(token.toString());
+ //!this.debug|| print(token.toString());
/*
assert token.getType() == Token.SEMI ||
token.getType() == Token.ASSIGN ||
} else {
//var bn = this.braceNesting;
var bn = this.braceNesting;
- var nts = [];
+ var nts = new Gee.ArrayList<Token>();
while (true) {
- if (!token || token.type == 'VOID' || token.data == ',') {
+ if (!token || token.type == "VOID" || token.data == ",") {
break;
}
- nts.push(token);
+ nts.add(token);
token = this.ts.nextTok();
}
- if (nts.length) {
+ if (nts.size > 0) {
var TS = this.ts;
this.ts = new TokenStream(nts);
this.parseExpression(scope);
token = this.ts.lookTok(1);
//!this.debug||
// print("AFTER EXP: " + token.toString());
- if (token.data == ';') {
+ if (token.data == ";") {
break;
}
}
//print('SCOPE-CURLY/PAREN:' + token.toString());
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
- if (token.props) {
+ if (token.props.size() > 0) {
// { a : ... , c : .... }