this.mode = 'BUILDING_SYMBOL_TREE';
this.parseScope(this.globalScope);
+
},
//print(JSON.stringify(this.ts, null, 4)); Seed.quit();
while (null != (token = this.ts.next())) {
- //print("TOK"+ token.toString());
+ print("TOK"+ token.toString());
// this.timerPrint("parseScope AFTER lookT: " + token.toString());
if (token.is('WHIT')) {
- if (!token._isDoc) {
+ if (token.name != 'JSDOC') {
continue; //skip.
}
if (this.currentDoc) {
this.addSymbol('', true);
-
//throw "Unconsumed Doc (TOKwhitespace): " + this.currentDoc.toSource();
}
// apply ( XXXX, {
-
+ /*
+ print(JSON.stringify([
+ token.data,
+ this.ts.lookTok(1).data ,
+ this.ts.lookTok(2).type ,
+ this.ts.lookTok(3).data ,
+ this.ts.lookTok(4).data
+ ], null, 4));
+ */
+
if (/\.(applyIf|apply)$/.test(token.data) &&
this.ts.lookTok(1).data == '(' &&
this.ts.lookTok(2).type == 'NAME' &&
if (this.currentDoc) {
this.addSymbol(scopeName,false,'OBJECT');
-
}
this.ts.nextTok(); /// ,
this.ts.nextTok(); // {
- scopeName = fixAlias(scopeName);
+ scopeName = fixAlias(scopeName);
var fnScope = new Scope(this.braceNesting, scope, token.n, scopeName);
this.indexedScopes[this.ts.cursor] = fnScope;
scope = fnScope;
// xxx = new yyy ( {
// change scope to xxxx
-
+ /*
+ print(JSON.stringify([
+ this.ts.lookTok(1).data ,
+ this.ts.lookTok(2).name ,
+ this.ts.lookTok(3).type ,
+ this.ts.lookTok(4).data ,
+ this.ts.lookTok(5).data
+ ], null, 4));
+ */
if ( this.ts.lookTok(1).data == '=' &&
this.ts.lookTok(2).name == 'NEW' &&
this.ts.lookTok(3).type == 'NAME' &&
scopeName = fixAlias(scopeName);
var fnScope = new Scope(this.braceNesting, scope, token.n,
'$this$='+scopeName+'.prototype|$private$|'+scopeName+'.prototype');
+
this.indexedScopes[this.ts.cursor] = fnScope;
//scope = fnScope;
//this.scopesIn(fnScope);