projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cb2da95
)
JSDOC/ScopeParser.js
author
Alan Knowles
<alan@akbkhome.com>
Thu, 15 Jul 2010 08:52:27 +0000
(16:52 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 15 Jul 2010 08:52:27 +0000
(16:52 +0800)
JSDOC/ScopeParser.js
patch
|
blob
|
history
diff --git
a/JSDOC/ScopeParser.js
b/JSDOC/ScopeParser.js
index
a7abc9c
..
b77f6ee
100644
(file)
--- a/
JSDOC/ScopeParser.js
+++ b/
JSDOC/ScopeParser.js
@@
-277,7
+277,7
@@
ScopeParser.prototype = {
if (this.mode == "BUILDING_SYMBOL_TREE") {
if (this.mode == "BUILDING_SYMBOL_TREE") {
- identifier = thisScope.getIdentifier(token.data) ;
+ identifier = thisScope.getIdentifier(token.data
,token
) ;
if (identifier == false) {
thisScope.declareIdentifier(token.data, token);
if (identifier == false) {
thisScope.declareIdentifier(token.data, token);
@@
-485,7
+485,7
@@
ScopeParser.prototype = {
//println("GOT IDENT: <B>" + symbol + "</B><BR/>");
//println("GOT IDENT (2): <B>" + symbol + "</B><BR/>");
//println("GOT IDENT: <B>" + symbol + "</B><BR/>");
//println("GOT IDENT (2): <B>" + symbol + "</B><BR/>");
- identifier = this.getIdentifier(symbol, thisScope);
+ identifier = this.getIdentifier(symbol, thisScope
, token
);
if (identifier == false) {
// BUG!find out where builtin is defined...
if (identifier == false) {
// BUG!find out where builtin is defined...
@@
-525,7
+525,7
@@
ScopeParser.prototype = {
var _t = this;
this.ts.look(-1).data.replace(/eval:var:([a-z_]+)/ig, function(m, a) {
var _t = this;
this.ts.look(-1).data.replace(/eval:var:([a-z_]+)/ig, function(m, a) {
- var hi = _t.getIdentifier(a, thisScope);
+ var hi = _t.getIdentifier(a, thisScope
, token
);
// println("PROTECT "+a+" from munge" + (hi ? "FOUND" : "MISSING"));
if (hi) {
// println("PROTECT "+a+" from munge");
// println("PROTECT "+a+" from munge" + (hi ? "FOUND" : "MISSING"));
if (hi) {
// println("PROTECT "+a+" from munge");
@@
-717,7
+717,7
@@
ScopeParser.prototype = {
if (this.mode == 'PASS2_SYMBOL_TREE') {
if (this.mode == 'PASS2_SYMBOL_TREE') {
- identifier = this.getIdentifier(symbol, currentScope);
+ identifier = this.getIdentifier(symbol, currentScope
, token
);
//println("<B>??</B>");
if (identifier == false) {
//println("<B>??</B>");
if (identifier == false) {
@@
-767,7
+767,7
@@
ScopeParser.prototype = {
// look for eval:var:noreplace\n
var _t = this;
this.ts.look(-1).data.replace(/eval:var:([a-z]+)/ig, function(m, a) {
// look for eval:var:noreplace\n
var _t = this;
this.ts.look(-1).data.replace(/eval:var:([a-z]+)/ig, function(m, a) {
- var hi = _t.getIdentifier(a, currentScope);
+ var hi = _t.getIdentifier(a, currentScope
, token
);
//println("PROTECT "+a+" from munge" + (hi ? "FOUND" : "MISSING"));
if (hi) {
// println("PROTECT "+a+" from munge");
//println("PROTECT "+a+" from munge" + (hi ? "FOUND" : "MISSING"));
if (hi) {
// println("PROTECT "+a+" from munge");
@@
-822,7
+822,7
@@
ScopeParser.prototype = {
currentScope.declareIdentifier(symbol, token);
} else {
//?? why inc the refcount?? - that should be set when building the tree???
currentScope.declareIdentifier(symbol, token);
} else {
//?? why inc the refcount?? - that should be set when building the tree???
- identifier = this.getIdentifier(symbol, currentScope);
+ identifier = this.getIdentifier(symbol, currentScope
, token
);
identifier.refcount++;
}
identifier.refcount++;
}
@@
-848,7
+848,7
@@
ScopeParser.prototype = {
if (this.mode == 'BUILDING_SYMBOL_TREE') {
// Get the name of the function and declare it in the current scope.
symbol = token.data;
if (this.mode == 'BUILDING_SYMBOL_TREE') {
// Get the name of the function and declare it in the current scope.
symbol = token.data;
- if (currentScope.getIdentifier(symbol) != false) {
+ if (currentScope.getIdentifier(symbol
,token
) != false) {
this.warn("The function " + symbol + " has already been declared in the same scope...", true);
}
currentScope.declareIdentifier(symbol,token);
this.warn("The function " + symbol + " has already been declared in the same scope...", true);
}
currentScope.declareIdentifier(symbol,token);
@@
-937,10
+937,10
@@
ScopeParser.prototype = {
scope.preventMunging();
},
scope.preventMunging();
},
- getIdentifier: function(symbol, scope) {
+ getIdentifier: function(symbol, scope
, token
) {
var identifier;
while (scope != false) {
var identifier;
while (scope != false) {
- identifier = scope.getIdentifier(symbol);
+ identifier = scope.getIdentifier(symbol
, token
);
//println("ScopeParser.getIdentgetUsedSymbols("+symbol+")=" + scope.getUsedSymbols().join(','));
if (identifier) {
return identifier;
//println("ScopeParser.getIdentgetUsedSymbols("+symbol+")=" + scope.getUsedSymbols().join(','));
if (identifier) {
return identifier;