From 7828b0f112b9af0a7d6f8b434b1e465c5ad05a88 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Sun, 15 Mar 2026 21:39:14 +0000 Subject: [PATCH] Yield newline token at end of comment --- asm.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/asm.js b/asm.js index e727a6d..55165e2 100644 --- a/asm.js +++ b/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; + } } } }