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/CompressWhite.vala
[gnome.introspection-doc-generator]
/
JSDOC
/
TokenStream.vala
diff --git
a/JSDOC/TokenStream.vala
b/JSDOC/TokenStream.vala
index
885af25
..
6c6f8ad
100644
(file)
--- a/
JSDOC/TokenStream.vala
+++ b/
JSDOC/TokenStream.vala
@@
-28,7
+28,10
@@
namespace JSDOC {
this.rewind();
}
this.rewind();
}
-
+ public Gee.ArrayList<Token> toArray()
+ {
+ return this.tokens;
+ }
public void rewind() {
public void rewind() {
@@
-121,7
+124,7
@@
namespace JSDOC {
}
return new Token("", "VOID", "END_OF_STREAM");
}
}
return new Token("", "VOID", "END_OF_STREAM");
}
- if (i > this.tokens.size) {
+ if (i >
=
this.tokens.size) {
return new Token("", "VOID", "END_OF_STREAM");
}
return new Token("", "VOID", "END_OF_STREAM");
}
@@
-210,11
+213,11
@@
namespace JSDOC {
* @param start {String} token name or data (eg. '{'
* @param stop {String} (Optional) token name or data (eg. '}'
*/
* @param start {String} token name or data (eg. '{'
* @param stop {String} (Optional) token name or data (eg. '}'
*/
- public Gee.ArrayList<Token> balance (string start, string stop = "") throws TokenStreamError
+ public Gee.ArrayList<Token> balance (string start, string
in_
stop = "") throws TokenStreamError
{
// accepts names or "{" etc..
{
// accepts names or "{" etc..
-
+ var stop = in_stop;
start = Lang.punc(start) == null ? start : Lang.punc(start);
if (stop=="") {
start = Lang.punc(start) == null ? start : Lang.punc(start);
if (stop=="") {
@@
-224,7
+227,7
@@
namespace JSDOC {
if (stop == null) {
throw new TokenStreamError.ArgumentError("balance called with invalid start/stop : %s",start);
}
if (stop == null) {
throw new TokenStreamError.ArgumentError("balance called with invalid start/stop : %s",start);
}
-
+ debug("START=%s, STOP=%s \n", start,stop);
var depth = 0;
var got = new Gee.ArrayList<Token>();
var started = false;
var depth = 0;
var got = new Gee.ArrayList<Token>();
var started = false;
@@
-233,6
+236,7
@@
namespace JSDOC {
Token token;
while (null != (token = this.look(1,false))) {
Token token;
while (null != (token = this.look(1,false))) {
+ debug("BALANCE: " + token.asString());
if (token.is(start)) {
// Seed.print("balance: START : " + depth + " " + token.data);
depth++;
if (token.is(start)) {
// Seed.print("balance: START : " + depth + " " + token.data);
depth++;
@@
-339,6
+343,16
@@
namespace JSDOC {
print(outs);
}
print(outs);
}
+ public void dumpAll(string indent)
+ {
+ for (var i = 0;i < this.tokens.size; i++) {
+
+ this.tokens[i].dump("");
+ }
+
+ }
+
+
}
}
}
}