JSDOC/ScopeParser.vala
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.vala
index 64ed9e9..097b898 100644 (file)
@@ -347,7 +347,7 @@ namespace JSDOC {
                           //  print('SCOPE-PROPS:' + JSON.stringify(token.props[prop],null,4));
                             if (val.vals.get(0).data == "function") {
                                 // parse a function..
-                                this.ts = new TokenStream(token.props[prop].val);
+                                this.ts = new TokenStream(val.vals);
                                 this.ts.nextTok();
                                 this.parseFunctionDeclaration(scope);
                                 
@@ -355,7 +355,7 @@ namespace JSDOC {
                             }
                             // key value..
                             
-                            this.ts = new TokenStream(token.props[prop].val);
+                            this.ts = new TokenStream(val.vals);
                             this.parseExpression(scope);
                             
                         }
@@ -368,14 +368,14 @@ namespace JSDOC {
                     
                     // ( ... ) or { .... } not object literals..
                     
-                    var _this = this;
-                   for (var xx =0; xx < token.items.length; xx++) {
-                               expr = token.items[xx];
+                    
+                   for (var xx =0; xx < token.items.size; xx++) {
+                                       expr = token.items.get(xx);
                     //token.items.forEach(function(expr) {
                             //print(expr.toString());
-                           _this.ts = new TokenStream(expr);
+                           this.ts = new TokenStream(expr);
                             //if (curTS.data == '(') {
-                                _this.parseScope(scope)
+                                this.parseScope(scope);
                             //} else {
                               //  _this.parseExpression(scope)
                             //}
@@ -397,7 +397,7 @@ namespace JSDOC {
                 case "KEYW.WITH":
                     //print('SCOPE-WITH:' + token.toString());
                     //println("<i>"+token.data+"</i>");   
-                    if (this.mode == "BUILDING_SYMBOL_TREE") {
+                    if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) {
                         // Inside a 'with' block, it is impossible to figure out
                         // statically whether a symbol is a local variable or an
                         // object member. As a consequence, the only thing we can
@@ -419,7 +419,7 @@ namespace JSDOC {
                   //  print('SCOPE-STRING:' + token.toString());
                     //println("<i>"+token.data+"</i>");
 
-                    if (this.ts.lookTok(-1).data == '{' && this.ts.lookTok(1).data == ':') {
+                    if (this.ts.lookTok(-1).data == "{" && this.ts.lookTok(1).data == ":") {
                         // then we are in an object lit.. -> we need to flag the brace as such...
                         isObjectLitAr.pop();
                         isObjectLitAr.push(true);