JSDOC/ScopeParser.vala
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.vala
index f24df6a..6a09325 100644 (file)
@@ -246,33 +246,34 @@ namespace JSDOC {
                         if (token == null) { // can return false at EOF!
                             break;
                         }
-                        if (token.name == "VAR" || token.data == ',') { // kludge..
+                        if (token.name == "VAR" || token.data == ",") { // kludge..
                             continue;
                         }
                         //this.logR("parseScope GOT VAR  : <B>" + token.toString() + "</B>"); 
                         if (token.type != "NAME") {
-                            for(var i = Math.max(this.ts.cursor-10,0); i < this.ts.cursor+1; i++) {
+                               
+                            for(var i = Int.max(this.ts.cursor-10,0); i < this.ts.cursor+1; i++) {
                                 print(this.ts.tokens[i].toString());
                             }
                             
                             print( "var without ident");
-                            Seed.quit()
+                            GLib.Process.exit (0);
                         }
                         
 
-                        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 ||