X-Git-Url: http://git.roojs.org/?p=gnome.introspection-doc-generator;a=blobdiff_plain;f=JSDOC%2FScope.js;h=b34d0a01c7ce8bb730012eec8591010d78c93060;hp=6a35e83adbbf1a32b08996685d296b26565526cb;hb=53b1092ed504e2d0fbd10d508b4b2b505a4eeff0;hpb=1fb557f3ddb7252bc458aa941d32f8541a36d5ed diff --git a/JSDOC/Scope.js b/JSDOC/Scope.js index 6a35e83..b34d0a0 100644 --- a/JSDOC/Scope.js +++ b/JSDOC/Scope.js @@ -9,6 +9,7 @@ const Identifier = imports.Identifier.Identifier const XObject = imports.XObject.XObject; +Scope.id = -1; function Scope(braceN, parent, startTokN, lastIdent, token) { @@ -18,7 +19,7 @@ function Scope(braceN, parent, startTokN, lastIdent, token) this.braceN = braceN this.parent = parent; - this.id = startTokN; + this.id = Scope.id++; this.identifiers = { }; this.subScopes = []; this.hints = { }; @@ -62,8 +63,8 @@ Scope.prototype = { { indent = indent || ''; print( - indent + "Scope: " + this.id + "\n" + - indent + " Started: " + ( this.token ? this.token.line : 'TOP' ) + "\n" + + indent + "Scope: " + this.id + "\n" + + indent + "Started: " + ( this.token ? this.token.line : 'TOP' ) + "\n" + indent + "- " + XObject.keys(this.identifiers).join(", ") + "\n" ); this.subScopes.forEach(function(s) {