//println("<i>"+token.data+"</i>");
break;
}
+
+ if (this.mode == 'CHECKING_SYMBOL_TREE') {
+
+ //println("GOT IDENT: -2 : " + this.ts.lookT(-2).toString() + " <BR> ..... -1 : " + this.ts.lookT(-1).toString() + " <BR> ");
+
+
+
+ //println("GOT IDENT: <B>" + symbol + "</B><BR/>");
+
+ //println("GOT IDENT (2): <B>" + symbol + "</B><BR/>");
+ identifier = this.getIdentifier(symbol, scope);
+
+ if (identifier == false) {
+// BUG!find out where builtin is defined...
+ if (symbol.length <= 3 && Scope.builtin.indexOf(symbol) < 0) {
+ // Here, we found an undeclared and un-namespaced symbol that is
+ // 3 characters or less in length. Declare it in the global scope.
+ // We don't need to declare longer symbols since they won't cause
+ // any conflict with other munged symbols.
+ this.globalScope.declareIdentifier(symbol, token);
+ this.warn("Found an undeclared symbol: " + symbol, true);
+ }
+
+ //println("GOT IDENT IGNORE(3): <B>" + symbol + "</B><BR/>");
+ } else {
+ token.identifier = identifier;
+ identifier.refcount++;
+ }
+ }
+
break;
//println("<B>SID</B>");
default:
if (token.type != 'KEYW') {
break;
}
- print("Check eval:");
+ // print("Check eval:");
symbol = token.data;
}
- } else if (this.mode == 'CHECKING_SYMBOL_TREE') {
-
- //println("GOT IDENT: -2 : " + this.ts.lookT(-2).toString() + " <BR> ..... -1 : " + this.ts.lookT(-1).toString() + " <BR> ");
-
-
-
- //println("GOT IDENT: <B>" + symbol + "</B><BR/>");
-
- //println("GOT IDENT (2): <B>" + symbol + "</B><BR/>");
- identifier = this.getIdentifier(symbol, scope);
-
- if (identifier == false) {
-// BUG!find out where builtin is defined...
- if (symbol.length <= 3 && Scope.builtin.indexOf(symbol) < 0) {
- // Here, we found an undeclared and un-namespaced symbol that is
- // 3 characters or less in length. Declare it in the global scope.
- // We don't need to declare longer symbols since they won't cause
- // any conflict with other munged symbols.
- this.globalScope.declareIdentifier(symbol, token);
- this.warn("Found an undeclared symbol: " + symbol, true);
- }
-
- //println("GOT IDENT IGNORE(3): <B>" + symbol + "</B><BR/>");
- } else {
- token.identifier = identifier;
- identifier.refcount++;
- }
-
}
break;