wip: let's figure out how edn keymaps will work

This commit is contained in:
🪞👃🪞 2025-01-12 13:01:15 +01:00
parent 4ab08e48e5
commit 794d4210c6
33 changed files with 161 additions and 85 deletions

View file

@ -62,10 +62,10 @@ impl<'a> Token<'a> {
)),
_ => return Err(ParseError::Unexpected(c))
},
Exp(source, index, length, depth) => match c {
')' => Exp(source, index, length + 1, depth - 1),
'(' => Exp(source, index, length + 1, depth + 1),
_ => Exp(source, index, length + 1, depth)
Exp(source, index, length, balance) => match c {
')' => Exp(source, index, length + 1, balance - 1),
'(' => Exp(source, index, length + 1, balance + 1),
_ => Exp(source, index, length + 1, balance)
},
};
chars = next