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

Soft parser update 2 #335

Merged
merged 7 commits into from
Dec 10, 2024
Merged

Soft parser update 2 #335

merged 7 commits into from
Dec 10, 2024

Conversation

simerplaha
Copy link
Member

@simerplaha simerplaha commented Dec 10, 2024

Sorry for the large PR. I've attempted to implement most of the parsers, it helps in modeling the AST.

A notable change is that ASTs of type CodeAST (i.e. ASTs that store code tokens) also contain documentation: Option[Comments].

For example, in the following code, the multiline comments are stored within the function. Useful for displaying documentation on hover.

// Function documentation
// @param param A parameter of type `Param`
fn function(param: Param) -> ...

Test cases and documentation are pending. The following PRs will address them.

@simerplaha simerplaha requested a review from tdroxler December 10, 2024 02:14
Copy link
Member

@tdroxler tdroxler left a comment

Choose a reason for hiding this comment

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

LGTM, reviewing every line of the parser is indeed a bit complicated, so I rather looked more the tests, which are very nice as usual.

@simerplaha
Copy link
Member Author

simerplaha commented Dec 10, 2024

Yep totally. Too hard to review at the moment, tests are needed.

@simerplaha simerplaha merged commit a00f180 into master Dec 10, 2024
3 checks passed
@simerplaha simerplaha deleted the soft_parser_v2 branch December 10, 2024 08: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.

2 participants