Skip to content

Rego package ref-arg-brack #485

Discussion options

You must be logged in to vote

I'm afraid the grammar is most likely wrong. For one thing, "package" ref-arg-brack doesn't describe only valid package lines. The following would be valid-per-grammar but invalid for rego:

package foo[_][x]

And I can have multiple ref-arg-brack, package rules["arg-1"]["arg-2"]?

Yes. You could also use brackets where they're unnecessary, like package foo["bar"], I think.

Is this grammar 'ref-arg-brack = "[" ( scalar | var | array | object | set | "_" ) "]"' accurate? I don't see the 'dash'.

It should be covered by scalar? Since "i-am-dashing" is a string?

Also, as another word of warning, the grammar in the docs is a bit... non-optimal insofar as it's just text in a document. It's not…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Ronnie-personal
Comment options

@srenatus
Comment options

Answer selected by Ronnie-personal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants