about summary refs log tree commit diff stats
path: root/src/html
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-07-03 18:06:28 +0200
committerbptato <nincsnevem662@gmail.com>2023-07-03 18:06:38 +0200
commit4a156d495ef6931db9fbc87978178cdbca676444 (patch)
tree10c456bdeb7bdfec92bc891b7b2141423c64e618 /src/html
parent6372f3bd156bd24e53ae418bfc04ffceb45139f1 (diff)
downloadchawan-4a156d495ef6931db9fbc87978178cdbca676444.tar.gz
htmltokenizer: fix regression
we need that break statement there, it seems
Diffstat (limited to 'src/html')
-rw-r--r--src/html/htmltokenizer.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/html/htmltokenizer.nim b/src/html/htmltokenizer.nim
index fdc8507e..fc1e8e06 100644
--- a/src/html/htmltokenizer.nim
+++ b/src/html/htmltokenizer.nim
@@ -168,6 +168,7 @@ iterator tokenize*(tokenizer: var Tokenizer): Token =
   template emit(ch: char) = emit Token(t: CHARACTER_ASCII, c: ch)
   template emit_eof =
     emit EOF
+    break
   template emit_tok =
     if tokenizer.attr:
       tokenizer.tok.attrs[tokenizer.attrn] = tokenizer.attrv
@@ -303,8 +304,10 @@ iterator tokenize*(tokenizer: var Tokenizer): Token =
           eofstmts = elsestmts
         let fake_eof = quote do:
           if is_eof:
+            {.warning[UnreachableCode]:off.}
             `eofstmts`
             continue
+            {.warning[UnreachableCode]:on.}
         mainstmtlist.insert(0, fake_eof)
         if hasanythingelse:
           let fake_anything_else = quote do: