opa icon indicating copy to clipboard operation
opa copied to clipboard

Rego grammar from the documentation is out-of-date

Open tsandall opened this issue 1 year ago • 1 comments

There are a few instances where the grammar has not kept up-to-date with the parser:

1. The % operator is missing
2. data.refrules.fruit["[color.name](http://color.name/)"](fruit.apple, "green") is a valid expr-call
3. expressions in a ref-arg-brack (i.e. x[i + 1]) are allowed
  1. We can just add % to arith-operator
  2. I think expr-call should be term "(" [ expr { "," expr } ] ")" because even [1](2) parses (it just fails to compile...)
  3. I think ref-arg-brack should be "[" (term | expr-call | expr-infix "]"

We should check the parser for 2 and 3.

tsandall avatar Sep 29 '23 16:09 tsandall

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.

stale[bot] avatar Oct 29 '23 16:10 stale[bot]