From: Alan Knowles Date: Thu, 15 Jul 2010 05:14:27 +0000 (+0800) Subject: JSDOC/ScopeParser.js X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=commitdiff_plain;h=c9c720ff1727ecbd67c84cf13764c8cb43fac35d JSDOC/ScopeParser.js --- diff --git a/JSDOC/ScopeParser.js b/JSDOC/ScopeParser.js index 171e3cb..74b7001 100644 --- a/JSDOC/ScopeParser.js +++ b/JSDOC/ScopeParser.js @@ -14,6 +14,10 @@ Scope = imports['JSDOC/Scope.js'].Scope; * so debugging is possible. * * +* at present it just runs along the stream and finds stuff then calls parseExpr .. etc,, +* +* +* It would be better to parse blocks of code rather than the whole stream.. * * * @@ -200,42 +204,7 @@ ScopeParser.prototype = { //println("LOG:" + str + "
"); }, - - dumpLine : false, - dumpToken: function (tok, scope, brace) { - if (this.dumpLine == false) { - this.dumpLine = { - str : tok.data + ' ', - scope : scope.length, - brace : brace - } - return; - } - - if (this.dumpLine.scope == scope.length && this.dumpLine.brace == brace) { - this.dumpLine.str += tok.data + ' '; - if (this.dumpLine.str.length > 80 || tok.data ==';') { - - print( - // (new Array(this.dumpLine.scope)).join(" ") + '|' + - (new Array(this.dumpLine.brace+1)).join(" ") + this.dumpLine.str); - this.dumpLine.str = ''; - } - return; - } - - print( - // (new Array(this.dumpLine.scope)).join(" ") + '|' + - (new Array(this.dumpLine.brace+1)).join(" ") + this.dumpLine.str); - - - this.dumpLine = { - str : tok.data + ' ', - scope : scope.length, - brace : brace - } - - }, +