kitty-lang
kitty-lang copied to clipboard
Sequence of more than 2 expressions doesn't parse
Probably due to an (undetected ?) shift / reduce conflict in the parser, sequence of expressions are only valid for 2 expressions. You can reproduce the issue with the following kitty-lang sample :
1; 2; 3
This will raise a ParseError
Somewhat linked to this https://github.com/darnuria/kitty-lang/blob/master/parser.mly#L129. I am not satisfied by how statements are ~~not~~ handled now.
I have some idea to address this nicely like introducing a effect system block imperative where you can do local mutation and statement. But I didn't dig the problem too much.
Before any step, I prefer to add a Harley Mindler like type system and after add statement and mutation after.