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

AST tree #10

Open
ljc20 opened this issue Mar 8, 2022 · 1 comment
Open

AST tree #10

ljc20 opened this issue Mar 8, 2022 · 1 comment

Comments

@ljc20
Copy link

ljc20 commented Mar 8, 2022

Hi I was wondering how we could create the ast statements for functions such as if or else and while ? I have gotten a certain amount of it but would love some clarification. Thank you

@ymherklotz
Copy link
Member

So if, else and while are statements, not functions, but yes you can create nodes for each of them in the AST. These could even share some code, because they might have a lot of things in common, in which case you can create a general Statement node that these statements can inherit from.

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

No branches or pull requests

2 participants