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

Split Node into Expression, Statement and Declaration #1371

Closed
HalidOdat opened this issue Jun 29, 2021 · 5 comments
Closed

Split Node into Expression, Statement and Declaration #1371

HalidOdat opened this issue Jun 29, 2021 · 5 comments
Assignees
Labels
ast Issue surrounding the abstract syntax tree E-Medium Medium difficulty problem parser Issues surrounding the parser technical debt
Milestone

Comments

@HalidOdat
Copy link
Member

Currently Node is both a expression, statement and declaration. It would be better if Node was split into how the spec describes it Expression, Statement and also Declaration. Why do we want this? Right now we don't differentiate between statements (like if, while, etc) and expressions (like 2 + 2), while we could make it work like this, it makes somethings awkward like if (cond) {}, cond should only an expression, and when we parse it we check for this, but some checks can be elided if we leverage the type system, making illegal state unrepresentable.

We want to match to what astexplorer outputs.

@HalidOdat HalidOdat added technical debt parser Issues surrounding the parser E-Medium Medium difficulty problem ast Issue surrounding the abstract syntax tree labels Jun 29, 2021
@jtmorrisbytes
Copy link

Is anyone working on this?

@Razican
Copy link
Member

Razican commented Aug 18, 2021

Is anyone working on this?

I don't think so, do you want me to assign it to you?

@pdogr
Copy link
Contributor

pdogr commented Mar 23, 2022

If this is still available, can I work on this?

@jedel1043
Copy link
Member

If this is still available, can I work on this?

We haven't assigned someone, so please do! Let me assign it to you

@jedel1043
Copy link
Member

I'll work on this in the next days :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast Issue surrounding the abstract syntax tree E-Medium Medium difficulty problem parser Issues surrounding the parser technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants