Regorus's parser rejects Rego reserved keywords (as, default, else, if, import, in, not, package, some, with, plus several v1 additions like every, true, false, null) when used after a . as field names. For example:
allow if {
input.v0.package.format == "npm"
}
Regorus rejects this with error: expected ident (or similar) at input.v0.package because package is a reserved keyword.
OPA accepts this syntax via the keywords_in_refs capability, which is enabled by default in standard OPA builds. The semantic ambiguity is resolved in OPA's parser because the position after . is unambiguously a field name, not a statement-level keyword.
Would it be possible to add a configuration option to the Regorus Engine to opt into the same behavior?
Regorus's parser rejects Rego reserved keywords (as, default, else, if, import, in, not, package, some, with, plus several v1 additions like every, true, false, null) when used after a . as field names. For example:
allow if {
input.v0.package.format == "npm"
}
Regorus rejects this with error: expected ident (or similar) at input.v0.package because package is a reserved keyword.
OPA accepts this syntax via the keywords_in_refs capability, which is enabled by default in standard OPA builds. The semantic ambiguity is resolved in OPA's parser because the position after . is unambiguously a field name, not a statement-level keyword.
Would it be possible to add a configuration option to the Regorus Engine to opt into the same behavior?