X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScope.js;h=425a385f206a494a8dd6a8772d3aaf3d96c82f7f;hp=8ae7f620e693ef613189154a651bfe94b28ecde1;hb=41e759fd84cab731cf33d821bb4e8755ff1e4f76;hpb=5df1c9a76af44aeac8e8a0ca5911ee084a485945 diff --git a/JSDOC/Scope.js b/JSDOC/Scope.js index 8ae7f62..425a385 100644 --- a/JSDOC/Scope.js +++ b/JSDOC/Scope.js @@ -9,7 +9,7 @@ const Identifier = imports.Identifier.Identifier const XObject = imports.XObject.XObject; -Scope.id = 0; +Scope.id = 1; function Scope(braceN, parent, startTokN, lastIdent, token) { @@ -62,10 +62,17 @@ Scope.prototype = { dump : function(indent) { indent = indent || ''; + var str = ''; + for (var k in this.identifiers) { + str += str.length ? ", " : ""; + str += k + '=>' + this.identifiers[k].mungedValue; + } + print( indent + "Scope: " + this.id + "\n" + - indent + "Started: " + ( this.token ? this.token.line : 'TOP' ) + "\n" + - indent + "- " + XObject.keys(this.identifiers).join(", ") + "\n" + + indent + "Started: " + ( this.token ? this.token.toString(): 'TOP' ) + "\n" + + indent + "- " + str + "\n" ); this.subScopes.forEach(function(s) { s.dump(indent + ' ');