projects
/
gnome.introspection-doc-generator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JSDOC/ScopeParser.js
[gnome.introspection-doc-generator]
/
JSDOC
/
TokenStream.js
diff --git
a/JSDOC/TokenStream.js
b/JSDOC/TokenStream.js
index
d36a01f
..
7b3328f
100644
(file)
--- a/
JSDOC/TokenStream.js
+++ b/
JSDOC/TokenStream.js
@@
-138,6
+138,7
@@
TokenStream = XObject.define(
/**
* @return {Token|null}
/**
* @return {Token|null}
+ * next token (with white space)
*/
*/
@@
-185,17
+186,19
@@
TokenStream = XObject.define(
*/
balance : function(/**String*/start, /**String*/stop) {
*/
balance : function(/**String*/start, /**String*/stop) {
- start = typeof(Lang.matching(start)) == 'undefined' ? Lang.punc(start) : start;
+
+ start = typeof(Lang.punc(start)) == 'undefined' ? start : Lang.punc(start);
if (!stop) stop = Lang.matching(start);
var depth = 0;
var got = [];
var started = false;
if (!stop) stop = Lang.matching(start);
var depth = 0;
var got = [];
var started = false;
- Seed.print("STOP:" + stop);
+ //Seed.print("START:" + start);
+ //Seed.print("STOP:" + stop);
while ((token = this.look())) {
if (token.is(start)) {
while ((token = this.look())) {
if (token.is(start)) {
- Seed.print("balance: START : " + depth + " " + token.data);
+
//
Seed.print("balance: START : " + depth + " " + token.data);
depth++;
started = true;
}
depth++;
started = true;
}
@@
-206,8
+209,8
@@
TokenStream = XObject.define(
if (token.is(stop)) {
depth--;
if (token.is(stop)) {
depth--;
- Seed.print("balance: STOP: " + depth + " " + token.data);
- if (depth
== 0
) return got;
+
//
Seed.print("balance: STOP: " + depth + " " + token.data);
+ if (depth
< 1
) return got;
}
if (!this.next()) break;
}
}
if (!this.next()) break;
}
@@
-266,7
+269,8
@@
TokenStream = XObject.define(
end = Math.min(end || this.tokens.length, this.tokens.length);
var out='';
for (var i =start;i < end; i++) {
end = Math.min(end || this.tokens.length, this.tokens.length);
var out='';
for (var i =start;i < end; i++) {
- out += this.tokens[i].data;
+
+ out += (this.tokens[i].outData == false) ? this.tokens[i].data : this.tokens[i].outData;
};
print(out);
}
};
print(out);
}