AlexB
06/18/2024, 5:30 PMaaa - bbb & ccc + ddd
is equivalent to aaa - (bbb & (ccc + ddd))
. In other words, "+" has the highest priority and "-" the lowest. I'd say, that this is rather counter-intuitive and based on some earlier answers and on this line here https://github.com/authzed/spicedb/blob/main/pkg/schemadsl/parser/parser.go#L441 , I can assume that this was unintentional, and the precedence was meant to be the opposite of what it actually is. In any case, documenting the actual state of things and maybe adding a recommendation that parenthesis are always used would be very helpful.