From: Bryan English Date: Mon, 19 Jan 2026 20:14:01 +0000 (-0500) Subject: fix comments X-Git-Url: https://rethought.computer/gitweb//gitweb//git?a=commitdiff_plain;h=ef6927232dce09d4d3616e136e72d2472f1a7e87;p=sorel-lang.git fix comments --- 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); + } }