// test code
void main() {
+ var lc = new JSDOC.Lang_Class ();
var tr = new JSDOC.TokenReader();
tr.keepDocs =true;
tr.keepWhite = true;
public void dump()
{
foreach(var token in this.tokens) {
- print(token.asString());
+ print(token.asString() +"\n");
}
}
{
string found = "";
- while (!stream.lookEOF() && Lang.punc(found + stream.look().to_string()).length > 0) {
+ while (!stream.lookEOF()) {
+ var ns = stream.look().to_string();
+
+ if (null == Lang.punc(found + ns )) {
+ break;
+ }
found += stream.next();
}
) {
var line = this.line;
while (!stream.lookEOF()) {
- print(stream.look().to_string());
- if ( !Lang.isNewline(stream.look().to_string())) {
+ //print(stream.look().to_string());
+ if ( Lang.isNewline(stream.look().to_string())) {
break;
}
found += stream.next();
}
- //if (!stream.lookEOF()) { // what? << eat the EOL?
+ if (!stream.lookEOF()) { // lookinng for end of line... if we got it, then do not eat the character..
found += stream.next();
- //}
+ }
if (this.keepComments) {
tokens.push(new Token(found, "COMM", "SINGLE_LINE_COMM", line));
}