forked from open-policy-agent/opa
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit contains a few syntax/parsing changes: 1) Old head :- body rule syntax is no longer supported. All rules must be declared as: head { body } now. 2) Semicolon has replaced comma as the conjunction operator. This avoids the ambiguity between set literals and curly-brace enclosed bodies. 3) ast.ParseBody will concatenate bodies that it receives from the parser. This way, callers can invoke ast.ParseBody without enclosing multiple expressions in braces. 4) Trailing commas are allowed in sets, arrays, and objects. To declare a set of size one a trailing comma must be used, e.g., {foo,} => set(foo) where as {foo} => body(expr(foo)). The following commit will update all of the existing test cases to bring them into compliance with the new syntax. Fixes open-policy-agent#253
- Loading branch information
Showing
3 changed files
with
45 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters