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 (from parent 1:
821f387
)
JSDOC/ScopeParser.js
author
Alan Knowles
<alan@akbkhome.com>
Thu, 15 Jul 2010 08:14:33 +0000
(16:14 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Thu, 15 Jul 2010 08:14:33 +0000
(16:14 +0800)
JSDOC/ScopeParser.js
patch
|
blob
|
history
diff --git
a/JSDOC/ScopeParser.js
b/JSDOC/ScopeParser.js
index
4479462
..
538957c
100644
(file)
--- a/
JSDOC/ScopeParser.js
+++ b/
JSDOC/ScopeParser.js
@@
-234,7
+234,7
@@
ScopeParser.prototype = {
//this.scopes.forEach(function() {
// scopeIndent += ' ';
//});
//this.scopes.forEach(function() {
// scopeIndent += ' ';
//});
- print(">> ENTER SCOPE");
+
//
print(">> ENTER SCOPE");
@@
-243,7
+243,7
@@
ScopeParser.prototype = {
while (token) {
// this.timerPrint("parseScope AFTER lookT: " + token.toString());
//this.dumpToken(token , this.scopes, this.braceNesting);
while (token) {
// this.timerPrint("parseScope AFTER lookT: " + token.toString());
//this.dumpToken(token , this.scopes, this.braceNesting);
- print('SCOPE:' + token.toString());
+
//
print('SCOPE:' + token.toString());
//this.log(token.data);
if (token.type == 'NAME') {
// print('*' + token.data);
//this.log(token.data);
if (token.type == 'NAME') {
// print('*' + token.data);
@@
-251,14
+251,14
@@
ScopeParser.prototype = {
switch(token.type + '.' + token.name) {
case "KEYW.VAR":
case "KEYW.CONST": // not really relivant as it's only mozzy that does this.
switch(token.type + '.' + token.name) {
case "KEYW.VAR":
case "KEYW.CONST": // not really relivant as it's only mozzy that does this.
- print('SCOPE-VAR:' + token.toString());
+
//
print('SCOPE-VAR:' + token.toString());
var vstart = this.ts.cursor +1;
//this.log("parseScope GOT VAR/CONST : " + token.toString());
while (true) {
token = this.ts.nextTok();
//!this.debug|| print( token.toString());
var vstart = this.ts.cursor +1;
//this.log("parseScope GOT VAR/CONST : " + token.toString());
while (true) {
token = this.ts.nextTok();
//!this.debug|| print( token.toString());
- print('SCOPE-VAR-VAL:' + token.toString());
+
//
print('SCOPE-VAR-VAL:' + token.toString());
if (!token) { // can return false at EOF!
break;
}
if (!token) { // can return false at EOF!
break;
}
@@
-318,8
+318,8
@@
ScopeParser.prototype = {
break;
case "KEYW.FUNCTION":
break;
case "KEYW.FUNCTION":
- if (this.mode == 'BUILDING_SYMBOL_TREE')
- print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
+
//
if (this.mode == 'BUILDING_SYMBOL_TREE')
+
//
print('SCOPE-FUNC:' + JSON.stringify(token,null,4));
//println("<i>"+token.data+"</i>");
var bn = this.braceNesting;
this.parseFunctionDeclaration();
//println("<i>"+token.data+"</i>");
var bn = this.braceNesting;
this.parseFunctionDeclaration();
@@
-328,7
+328,7
@@
ScopeParser.prototype = {
case "PUNC.LEFT_CURLY": // {
case "PUNC.LEFT_PAREN": // (
case "PUNC.LEFT_CURLY": // {
case "PUNC.LEFT_PAREN": // (
- print('SCOPE-CURLY/PAREN:' + token.toString());
+
//
print('SCOPE-CURLY/PAREN:' + token.toString());
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
if (token.props) {
//println("<i>"+token.data+"</i>");
var curTS = this.ts;
if (token.props) {
@@
-374,7
+374,7
@@
ScopeParser.prototype = {
break;
case "PUNC.RIGHT_CURLY": // }
break;
case "PUNC.RIGHT_CURLY": // }
- print("<< EXIT SCOPE");
+
//
print("<< EXIT SCOPE");
return;
/*
//println("<i>"+token.data+"</i>");
return;
/*
//println("<i>"+token.data+"</i>");
@@
-397,7
+397,7
@@
ScopeParser.prototype = {
break;
*/
case "KEYW.WITH":
break;
*/
case "KEYW.WITH":
- print('SCOPE-WITH:' + token.toString());
+
//
print('SCOPE-WITH:' + token.toString());
//println("<i>"+token.data+"</i>");
if (this.mode == "BUILDING_SYMBOL_TREE") {
// Inside a 'with' block, it is impossible to figure out
//println("<i>"+token.data+"</i>");
if (this.mode == "BUILDING_SYMBOL_TREE") {
// Inside a 'with' block, it is impossible to figure out
@@
-411,7
+411,7
@@
ScopeParser.prototype = {
break;
case "KEYW.CATCH":
break;
case "KEYW.CATCH":
- print('SCOPE-CATCH:' + token.toString());
+
//
print('SCOPE-CATCH:' + token.toString());
//println("<i>"+token.data+"</i>");
this.parseCatch();
break;
//println("<i>"+token.data+"</i>");
this.parseCatch();
break;
@@
-711,7
+711,7
@@
ScopeParser.prototype = {
print("EXPR-NAME:" + JSON.stringify(token, null, 4));
} else {
print("EXPR-NAME:" + token.toString());
print("EXPR-NAME:" + JSON.stringify(token, null, 4));
} else {
print("EXPR-NAME:" + token.toString());
-
}
+ }
symbol = token.data;
//print("in NAME = " + token.toString());
//print("in NAME 0: " + this.ts.look(0).toString());
symbol = token.data;
//print("in NAME = " + token.toString());
//print("in NAME 0: " + this.ts.look(0).toString());
@@
-819,10
+819,10
@@
ScopeParser.prototype = {
//assert token.getType() == Token.CATCH;
token = this.ts.nextTok();
//assert token.getType() == Token.LP; (
//assert token.getType() == Token.CATCH;
token = this.ts.nextTok();
//assert token.getType() == Token.LP; (
- token = this.ts.nextTok();
+
//
token = this.ts.nextTok();
//assert token.getType() == Token.NAME;
//assert token.getType() == Token.NAME;
- symbol = token.data;
+ symbol = token.
items[0].
data;
currentScope = this.scopes[this.scopes.length-1];
if (this.mode == 'BUILDING_SYMBOL_TREE') {
currentScope = this.scopes[this.scopes.length-1];
if (this.mode == 'BUILDING_SYMBOL_TREE') {