Skip to content

Compiled path test suite #102

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

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

Conversation

thehiddenwaffle
Copy link
Contributor

Still a work in progress but was hoping for feedback

…tion signatures.

Updated the grammar to handle function expressions more explicitly and aligned them with RFC standards for LogicalType, NodesType, and ValueType.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

During the course of testing functions I've realized that the current grammar isn't enforcing well typed arguments, meaning that a function call could make it through the grammar but still be considered invalid. This would seriously hamper the notion of being able compile paths because they would pest parse correctly then need to be checked again. I think tightening the grammar further to include a notion of the 3 types mentioned in the RFC would allow for a much more concise parser, as well as reduce validation logic during path parsing.

Copy link
Contributor Author

@thehiddenwaffle thehiddenwaffle Jun 2, 2025

Choose a reason for hiding this comment

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

I've read the RFC like 4 times now, and though I think I've got everything, but my head is starting to spin.

@thehiddenwaffle
Copy link
Contributor Author

I've specifically been putting a lot of focus into 2.4.2-3 and the examples laid out in 2.4.9. To me this feels like one of the last things to add to the grammar in order for the pest parser to generate completely valid paths. I also think that the closer the grammar is to being fully comprehensive the better off we are in terms of extensibility and safety.

Currently I left every little piece of info in the grammar file as comments and tried to mostly not change the parse tree that's being output so that we can make minimal code changes at first and then incrementally change the code to better fit the parse tree once I get all tests passing.

Other than that I need to perform similar changes on both versions of the AST then clean up a bit and this PR will be ready.

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.

1 participant