From ef6927232dce09d4d3616e136e72d2472f1a7e87 Mon Sep 17 00:00:00 2001 From: Bryan English Date: Mon, 19 Jan 2026 15:14:01 -0500 Subject: [PATCH] fix comments --- hylo-lang/hyloc/src/tokenizer.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hylo-lang/hyloc/src/tokenizer.rs b/hylo-lang/hyloc/src/tokenizer.rs index a489f15..ca4371b 100644 --- a/hylo-lang/hyloc/src/tokenizer.rs +++ b/hylo-lang/hyloc/src/tokenizer.rs @@ -77,7 +77,7 @@ pub fn tokenize<'a>(input: &'a str) -> Result>> { } if in_comment { - if char == ')' || char == '\n' { + if char == ')' { in_comment = false; last_is_whitespace = true; // not really true, but means don't need space after } @@ -144,4 +144,19 @@ mod tests { "); println!("result: {:?}", result); } + + #[test] + fn comments() { + let result = tokenize(" + ( + foo + bar + ) + : baz ( x y -- z ) + chicken + soup + ; + "); + println!("result: {:?}", result); + } } -- 2.43.0