feat(jmespath): add abstract syntax tree definition #2213
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of your changes
This PR introduces the definition of the components that make up the Abstract Syntax Tree (AST) for the JMESPath utility.
As discussed in the linked utility the AST is a hierarchical representation of the syntactic structure of a JMESPath expression and abstracts away from the specifics of the input text, capturing the components and relationships between them.
Each node in the AST follows a similar structure and is composed by three fields:
type
a string literal holding the name of the node (i.e.comparator
,field
,filter_projection
, etc.)children
an array containing the child nodes of this node (if any) - this helps establish the hierarchyvalue
the value of the node (i.e. any JSON serializable value)Related issues, RFCs
Issue number: #2210
Checklist
Breaking change checklist
Is it a breaking change?: NO
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.