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/TokenStream.vala
[gnome.introspection-doc-generator]
/
JSDOC
/
CompressWhite.vala
diff --git
a/JSDOC/CompressWhite.vala
b/JSDOC/CompressWhite.vala
index
4afcb6c
..
dffe4f2
100644
(file)
--- a/
JSDOC/CompressWhite.vala
+++ b/
JSDOC/CompressWhite.vala
@@
-71,25
+71,37
@@
namespace JSDOC
ts.cursor = cu;
continue;
}
ts.cursor = cu;
continue;
}
- // a = function() { ...
+ // a = function() { ...
-- add a semi colon a tthe end if not one there..
if (ts.lookTok(1).data == "=" && ts.lookTok(2).name == "FUNCTION") {
// freeze time..
//println("got = function() ");
if (ts.lookTok(1).data == "=" && ts.lookTok(2).name == "FUNCTION") {
// freeze time..
//println("got = function() ");
-
var cu = ts.cursor
;
- t
s.cursor+=2; // move two along, and balance...
+
tok = ts.nextTok()
;
+ t
ok = ts.nextTok();
- if (ts.balance("(").size < 1 ){
+ //tok = ts.next();
+ var cu = ts.cursor;
+ print("NEXT = should be brac: %s\n", ts.lookTok(1).asString());
+
+
+
+ if (ts.lookTok(1).data != "(" || ts.balance("(").size < 1 ){
+ print("balance ( issue on line %d\n", ts.toArray().get(cu).line);
ts.dump(cu-40, cu+2);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
ts.dump(cu+2, cu+40);
throw new CompressWhiteError.BRACE( "could not find end lbrace!!!" );
}
ts.dump(cu-40, cu+2);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
ts.dump(cu+2, cu+40);
throw new CompressWhiteError.BRACE( "could not find end lbrace!!!" );
}
+ tok = ts.lookTok(0);
+
+ cu = ts.cursor; // set the cursor to here.. so the next bit of the code will check inside the method.
+
//print("AFTER BALANCE (");
//ts.dump(cu, ts.cursor);
//ts.cursor--; // cursor at the (
//print("AFTER BALANCE (");
//ts.dump(cu, ts.cursor);
//ts.cursor--; // cursor at the (
- if (ts.balance("{").size < 1 ){
+ if (tok.data != "{" || ts.balance("{").size < 1 ){
+
ts.dump(cu-40, cu);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
ts.dump(cu, cu+40);
ts.dump(cu-40, cu);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
ts.dump(cu, cu+40);
@@
-164,6
+176,7
@@
namespace JSDOC
var cu = ts.cursor;
if (ts.balance("{").size < 1 ){
var cu = ts.cursor;
if (ts.balance("{").size < 1 ){
+
ts.dump(cu-40, cu);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
ts.dump(cu, cu+40);
ts.dump(cu-40, cu);
print(">>>>>>>>>>>>>>>>>HERE>>>>>>>>>>>>");
ts.dump(cu, cu+40);