JSDOC/ScopeParser.vala
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.vala
index 44e1ca1..6a95f0f 100644 (file)
@@ -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,10 +419,10 @@ 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);
+                        isObjectLitAr.remove_at(isObjectLitAr.size-1);
+                        isObjectLitAr.add(true);
                         //print(">>>>>> OBJLIT REPUSH(true)");
                     }
                     isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];