Yield newline token at end of comment
This commit is contained in:
8
asm.js
8
asm.js
@@ -59,12 +59,14 @@ class Tokenizer {
|
||||
let token;
|
||||
while (token = this.next()) {
|
||||
if (token.string == undefined
|
||||
&& token.startsWith(this.comment_start))
|
||||
&& token.startsWith(this.comment_start)) {
|
||||
this.comment = true;
|
||||
else if (this.comment && token == LINE_END)
|
||||
} else if (this.comment && token == LINE_END) {
|
||||
this.comment = false;
|
||||
else if (!this.comment)
|
||||
yield token;
|
||||
} else if (!this.comment) {
|
||||
yield token;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user