From 4a156d495ef6931db9fbc87978178cdbca676444 Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 3 Jul 2023 18:06:28 +0200 Subject: htmltokenizer: fix regression we need that break statement there, it seems --- src/html/htmltokenizer.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/html/htmltokenizer.nim') 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: -- cgit 1.4.1-2-gfad0