jmespath-ts
jmespath-ts copied to clipboard
Catch invalid slice expressions at compile time
For programs which compile expressions and then later evaluate them it is nice to flag invalid syntax during the compilation stage.
As far as I can tell, invalid slices with a step
of 0
were the only realistic situation where this wasn't already the case (it's validated by TreeInterpreter.ts
but ignored in the compiler). This pull request changes that to make invalid slice expressions like a[2:1:0]
trigger compilation errors.