Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Sequence of more than 2 expressions doesn't parse #3

Open
Vertmo opened this issue Oct 1, 2018 · 1 comment
Open

Sequence of more than 2 expressions doesn't parse #3

Vertmo opened this issue Oct 1, 2018 · 1 comment

Comments

@Vertmo
Copy link

Vertmo commented Oct 1, 2018

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

@darnuria
Copy link
Owner

darnuria commented Oct 9, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants