JSDOC/ScopeParser.vala
[gnome.introspection-doc-generator] / JSDOC / ScopeParser.vala
index 28e95ba..459a6a0 100644 (file)
@@ -264,7 +264,7 @@ namespace JSDOC {
                            if (this.mode == ScopeParserMode.BUILDING_SYMBOL_TREE) {
                                var identifier = scope.getIdentifier(token.data,token) ;
                                
-                               if (identifier == false) {
+                               if (identifier == null) {
                                    scope.declareIdentifier(token.data, token);
                                } else {
                                    token.identifier = identifier;
@@ -474,7 +474,7 @@ namespace JSDOC {
                                //println("GOT IDENT (2): <B>" + symbol + "</B><BR/>");
                            identifier = this.getIdentifier(symbol, scope, token);
                            
-                           if (identifier == false) {
+                           if (identifier == null) {
 // BUG!find out where builtin is defined...
                                if (symbol.length <= 3 &&  Scope.builtin.indexOf(symbol) < 0) {
                                    // Here, we found an undeclared and un-namespaced symbol that is
@@ -959,18 +959,18 @@ namespace JSDOC {
            scope.preventMunging();
        }
        
-       Token getIdentifier(string symbol, Scope in_scope, Token token) 
+       Token? getIdentifier(string symbol, Scope in_scope, Token token) 
        {
-           string identifier;
+           Token identifier;
            var scope = in_scope;
            while (scope != null) {
                identifier = scope.getIdentifier(symbol, token);
                //println("ScopeParser.getIdentgetUsedSymbols("+symbol+")=" + scope.getUsedSymbols().join(','));
-               if (identifier.length) {
+               if (identifier != null) {
                    return identifier;
                }
                scope = scope.parent;
            }
-           return "";
+           return null;
        }
 }