Cleaning language
This commit is contained in:
@@ -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 == '"' {
|
||||
|
||||
Reference in New Issue
Block a user