Closed springcomp closed 2 years ago
At this point we should rename index-expression
to bracket-expression
.
For the CI failures, I think we need to set warnings.simplefilter("ignore", ReusedAnchorWarning)
for check-jsonschema
At this point we should rename
index-expression
tobracket-expression
.
I can do this in an another PR.
For the CI failures, I think we need to set
warnings.simplefilter("ignore", ReusedAnchorWarning)
for check-jsonschema
Do you suggest I go ahead with this change?
Do you suggest I go ahead with this change?
I might be able to look at it later today, but you are welcome to beat me to it.
Would you prefer to just merge this or should we look into breaking up bracket-specifier
?
Especially given https://github.com/jmespath-community/jmespath.spec/discussions/82
Would you prefer to just merge this or should we look into breaking up
bracket-specifier
? Especially given #82
I think we should merge this as this is a bug with regards to the official grammar. The other change is more controversial as it involves changing the grammar to match an existing - possibly unintended - behavior.
The current
GRAMMAR
does not allow expressions like:foo[?bar == 'baz']
As it would parse as an
identifier
followed by alist-filter-expr
. However, this expression is perfectly valid and supported in all current library implementations. This suggests that the grammar is slightly wrong.This PR changes the grammar like so:
list-filter-expr
from the list of explicit alternatives for theexpression
rule.list-filter-expr
as an alternative for thebracket-specifier
rule.In effect, this turns the referred to expression above as an
index-expression
.