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

Initial AST validation for using-for #119

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ferranbt
Copy link
Contributor

This PR adds the initial AST validation for the using statement. This PR only has tests for the 3 parsing scenarios while the Solidity repo has dozens of them. I was wondering how do you want to approach that on solar. Should I create sub-directories like they do? Merge them on the same file? Should I copy/paste the whole syntax e2e tests from Solidity? Is it enough with basic tests and we do not need as many as Solidity has?

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as there is at least one test per error message it's fine; if you want to add more syntax tests in the same file, otherwise the other ones in that directory also include type checking which we'll add as we implement them

crates/sema/src/ast_passes.rs Outdated Show resolved Hide resolved
@ferranbt
Copy link
Contributor Author

otherwise the other ones in that directory also include type checking which we'll add as we implement them

Would you include those in the same file as well?

@DaniPopes
Copy link
Member

sure yeah, but you might need to split it into multiple files if a parsing error occurs because it won't continue checking the next lines

@ferranbt
Copy link
Contributor Author

sure yeah, but you might need to split it into multiple files if a parsing error occurs because it won't continue checking the next lines

Ok, will keep in mind for next time. This PR is ready for review again.

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, needs rebase

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.

2 participants