Skip to content

Commit

Permalink
docs: Correct a couple of issues in grammar documentation
Browse files Browse the repository at this point in the history
Remove "instructions", include "object-compr" and "set-compr" in "term".

Fixes open-policy-agent#1187

Signed-off-by: Nischal Sheth <[email protected]>
  • Loading branch information
Nischal Sheth authored and tsandall committed Jan 30, 2019
1 parent 0a83add commit b803902
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/book/language-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,10 @@ rule-body = [ else [ = term ] ] "{" query "}"
query = literal { ";" | [\r\n] literal }
literal = ( expr | "not" expr ) { with-modifier }
with-modifier = "with" term "as" term
instructions = expr { ";" | [\r\n] expr }
expr = term | expr-built-in | expr-infix
expr-built-in = var [ "." var ] "(" [ term { , term } ] ")"
expr-infix = [ term "=" ] term infix-operator term
term = ref | var | scalar | array | object | set | array-compr
term = ref | var | scalar | array | object | set | array-compr | object-compr | set-compr
array-compr = "[" term "|" rule-body "]"
set-compr = "{" term "|" rule-body "}"
object-compr = "{" object-item "|" rule-body "}"
Expand Down

0 comments on commit b803902

Please sign in to comment.