Cleaning language

This commit is contained in:
2026-01-29 01:10:53 +01:00
parent d106711708
commit 48f5920fed
10 changed files with 57 additions and 68 deletions

View File

@@ -97,24 +97,14 @@ pub fn tokenize_line(line: &str) -> Vec<Token> {
continue;
}
if c == '(' {
let end = line.len();
let comment_end = line[start..]
.find(')')
.map(|i| start + i + 1)
.unwrap_or(end);
if c == ';' && chars.peek().map(|(_, ch)| *ch) == Some(';') {
// ;; starts a comment to end of line
tokens.push(Token {
start,
end: comment_end,
end: line.len(),
kind: TokenKind::Comment,
});
while let Some((i, _)) = chars.peek() {
if *i >= comment_end {
break;
}
chars.next();
}
continue;
break;
}
if c == '"' {