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/TokenReader.vala
[gnome.introspection-doc-generator]
/
JSDOC
/
TokenReader.vala
diff --git
a/JSDOC/TokenReader.vala
b/JSDOC/TokenReader.vala
index
b4127d7
..
b49ffcc
100644
(file)
--- a/
JSDOC/TokenReader.vala
+++ b/
JSDOC/TokenReader.vala
@@
-288,14
+288,18
@@
namespace JSDOC {
if (found === "") {
return false;
}
if (found === "") {
return false;
}
- //print("WHITE = " + JSON.stringify(found));
+ //print("WHITE = " + JSON.stringify(found));
+
+
if (this.collapseWhite) {
if (this.collapseWhite) {
- found = " ";
+ found = " "; // this might work better if it was a '\n' ???
+ }
+ if (this.keepWhite) {
+ tokens.push(new Token(found, "WHIT", "SPACE", this.line));
}
}
- if (this.keepWhite) tokens.push(new Token(found, "WHIT", "SPACE", this.line));
return true;
return true;
- }
,
+ }
/**
@returns {Boolean} Was the token found?
/**
@returns {Boolean} Was the token found?
@@
-303,7
+307,7
@@
namespace JSDOC {
public bool read_newline (TokenStream stream, TokenArray tokens)
var found = "";
var line = this.line;
public bool read_newline (TokenStream stream, TokenArray tokens)
var found = "";
var line = this.line;
- while (!stream.look
().eof
&& Lang.isNewline(stream.look())) {
+ while (!stream.look
EOF()
&& Lang.isNewline(stream.look())) {
this.line++;
found += stream.next();
}
this.line++;
found += stream.next();
}
@@
-311,6
+315,11
@@
namespace JSDOC {
if (found === "") {
return false;
}
if (found === "") {
return false;
}
+
+ // if we found a new line, then we could check if previous character was a ';' - if so we can drop it.
+ // otherwise generally keep it.. in which case it should reduce our issue with stripping new lines..
+
+
//this.line++;
if (this.collapseWhite) {
found = "\n";
//this.line++;
if (this.collapseWhite) {
found = "\n";