JSDOC/TokenReader.js
[gnome.introspection-doc-generator] / JSDOC / TokenReader.js
index 63cb7f2..fb22a3d 100644 (file)
@@ -63,6 +63,7 @@ const TokenReader = XObject.define(
                 if (this.read_regx(stream, tokens))      continue;
                 if (this.read_numb(stream, tokens))      continue;
                 if (this.read_punc(stream, tokens))      continue;
+                if(typeof(tokens) == 'undefined') {console.log('empty????');}
                 if (this.read_newline(stream, tokens))   continue;
                 if (this.read_space(stream, tokens))     continue;
                 if (this.read_word(stream, tokens))      continue;
@@ -150,7 +151,7 @@ const TokenReader = XObject.define(
                     //Seed.print('(@' + n);
                     
                     var lt = this.lastSym(tokens, n);
-                   Seed.print(JSON.stringify(lt));
+                    print(JSON.stringify(lt));
                     if (lt.type != 'KEYW' || ['IF', 'WHILE'].indexOf(lt.name) < -1) {
                         if (!this.ignoreBadGrammer) {
                             throw {
@@ -259,6 +260,7 @@ const TokenReader = XObject.define(
                 found = "\n";
             }
             if (this.keepWhite) {
+                console.log(typeof(tokens));
                 var last = tokens.pop();
                 if (last && last.name != "WHIT") {
                     tokens.push(last);