X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.vala;h=3ba13662ea95475f4b9bd5bf36c1e0b0075d3226;hb=607cda50bb790f8a3a73cbbb859dbee494c4301a;hp=6f7193c14b2a229a6e49a9a75567aba477e6e09e;hpb=eecb018b22e4ed2a580fb4167c563ec0f6a6fb00;p=gnome.introspection-doc-generator diff --git a/JSDOC/ScopeParser.vala b/JSDOC/ScopeParser.vala index 6f7193c..3ba1366 100644 --- a/JSDOC/ScopeParser.vala +++ b/JSDOC/ScopeParser.vala @@ -769,7 +769,7 @@ namespace JSDOC { var symbol = token.data; - if (this.mode == 'BUILDING_SYMBOL_TREE') { + if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) { if (token.name == "EVAL") { //print(JSON.stringify(token,null,4)); @@ -810,19 +810,15 @@ namespace JSDOC { } //print("<< EXIT EXPRESSION"); this.expN--; - }, + } - parseCatch : function(scope) { + void parseCatch(scope) { - var symbol; - var token; - - var identifier; //token = getToken(-1); //assert token.getType() == Token.CATCH; - token = this.ts.nextTok(1); + var token = this.ts.nextTok(1); token = this.ts.nextTok(1); @@ -831,40 +827,38 @@ namespace JSDOC { //token = this.ts.nextTok(); //assert token.getType() == Token.NAME; - symbol = token.items[0][0].data; + var symbol = token.items[0][0].data; - if (this.mode == 'BUILDING_SYMBOL_TREE') { + if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) { // We must declare the exception identifier in the containing function // scope to avoid errors related to the obfuscation process. No need to // display a warning if the symbol was already declared here... scope.declareIdentifier(symbol, token.items[0][0]); } else { //?? why inc the refcount?? - that should be set when building the tree??? - identifier = this.getIdentifier(symbol, scope, token.items[0][0]); + var identifier = this.getIdentifier(symbol, scope, token.items[0][0]); identifier.refcount++; } //token = this.ts.nextTok(); //assert token.getType() == Token.RP; // ) - }, + } - parseFunctionDeclaration : function(scope) + void parseFunctionDeclaration (Scope scope) { //print("PARSE FUNCTION"); - var symbol; - var token; var fnScope = false; - var identifier; + var b4braceNesting = this.braceNesting + 0; //this.logR("PARSING FUNCTION"); - token = this.ts.nextTok(); + var token = this.ts.nextTok(); if (token.type == "NAME") { - if (this.mode == 'BUILDING_SYMBOL_TREE') { + if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) { // Get the name of the function and declare it in the current scope. symbol = token.data; if (scope.getIdentifier(symbol,token) != false) { @@ -885,8 +879,8 @@ namespace JSDOC { //assert token.getType() == Token.LP; - if (this.mode == 'BUILDING_SYMBOL_TREE') { - fnScope = new Scope(1, scope, token.n, '', token); + if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) { + var fnScope = new Scope(1, scope, token.n, '', token); //println("STORING SCOPE" + this.ts.cursor);