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

vet, parser: rewrite vet error handling (improve parser performance extend vvet) p1 #21417

Merged
merged 2 commits into from
May 4, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented May 4, 2024

Currently, vet errors are validated and filtered in the parser.

The changes will help with to take vet to the next level while also simplifying the parser and improving it's performance. Similar to recent changes, this also fits under the mantra "Parse, don't validate".

This will also resolve TODOS, which should not be TODOs in those modules.

// TODO: `$if vet {` for performance`

To simplify reviewing things I'll try to submit the changes in a few parts that can hopefully stand on their own without falling appart. The parts should become simpler when things progress.

The first part creates a base for vets evolution and extends it's ability to handle trailing space and indentation errors on it's own. This already takes load of the parser.

ttytm added 2 commits May 4, 2024 16:19
vet triggered correctly, ref. indent_with_space.vv
@ttytm ttytm marked this pull request as ready for review May 4, 2024 15:43
@ttytm
Copy link
Member Author

ttytm commented May 4, 2024

vet tests and even more sov test-cleancode should cover the changes.

@medvednikov medvednikov merged commit 387af74 into vlang:master May 4, 2024
69 checks passed
@ttytm ttytm deleted the vet-parser/parse-then-validate branch May 4, 2024 21:24
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