okay that's how

This commit is contained in:
🪞👃🪞 2025-01-12 02:42:13 +01:00
parent 19ed6a24b8
commit 4ab08e48e5
2 changed files with 20 additions and 25 deletions

View file

@ -26,13 +26,11 @@ impl<'a> Token<'a> {
':'|'@' => Sym(source, index, 1),
'0'..='9' => Num(source, index, 1),
'a'..='z' => Key(source, index, 1),
//'\'' => Chr(source, index, 1),
_ => return Err(ParseError::Unexpected(c))
},
Num(_, _, 0) => unreachable!(),
Sym(_, _, 0) => unreachable!(),
Key(_, _, 0) => unreachable!(),
//Chr(_, _, 0) => unreachable!(),
Num(source, index, length) => match c {
'0'..='9' => Num(source, index, length + 1),
' '|'\n'|'\r'|'\t' => return Ok((