JSDOC/Packer.vala
[gnome.introspection-doc-generator] / JSDOC / TokenReader.js
index f045865..9fe4fe7 100644 (file)
@@ -63,7 +63,6 @@ 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;
@@ -259,9 +258,8 @@ const TokenReader = XObject.define(
             if (this.collapseWhite) {
                 found = "\n";
             }
-            if (this.keepWhite) {
-                console.log('empty????');
-                var last = tokens.pop();
+             if (this.keepWhite) {
+                var last = tokens ? tokens.pop() : false;
                 if (last && last.name != "WHIT") {
                     tokens.push(last);
                 }