JSDOC/Scope.js
[gnome.introspection-doc-generator] / JSDOC / TokenReader.js
index a45bb0a..9fe4fe7 100644 (file)
@@ -56,7 +56,6 @@ const TokenReader = XObject.define(
             }
 
             while (!stream.look().eof) {
-                print_r(tokens);
                 if (this.read_mlcomment(stream, tokens)) continue;
                 if (this.read_slcomment(stream, tokens)) continue;
                 if (this.read_dbquote(stream, tokens))   continue;
@@ -259,8 +258,8 @@ const TokenReader = XObject.define(
             if (this.collapseWhite) {
                 found = "\n";
             }
-            if (this.keepWhite) {
-                var last = tokens.pop();
+             if (this.keepWhite) {
+                var last = tokens ? tokens.pop() : false;
                 if (last && last.name != "WHIT") {
                     tokens.push(last);
                 }