Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement parsing for statements #42

Merged
merged 2 commits into from
Dec 9, 2022
Merged

Implement parsing for statements #42

merged 2 commits into from
Dec 9, 2022

Conversation

mateuszmlc
Copy link
Contributor

@mateuszmlc mateuszmlc commented Dec 8, 2022

for (let <identifier> = <expr>; <expr>; <expr>) { <statements> }

I limited the initial statement to let, which I think is the most useful one, we can add support for other statements later.

@calummoore
Copy link
Contributor

Does it work without defining the let parameter? As in:

for (<identifier> = <expr>; <expr>; <expr>) { <statements> }

@mateuszmlc
Copy link
Contributor Author

mateuszmlc commented Dec 9, 2022

No, I'll add support for for (<let OR expr>; <expr>; <expr>) {}, which will allow that (assignments are expressions that return the value you set)

@mateuszmlc
Copy link
Contributor Author

No, I'll add support for for (<let OR expr>; <expr>; <expr>) {}, which will allow that (assignments are expressions that return the value you set)

Added

@calummoore calummoore merged commit a6d8139 into main Dec 9, 2022
@calummoore calummoore deleted the parse-for-statements branch May 19, 2023 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants