google / cel-spec

Common Expression Language -- specification and binary representation
https://cel.dev
Apache License 2.0
2.78k stars 222 forks source link

Fix `Member`/`Primary` BNF for messages #227

Closed Daniel-Bloom-dfinity closed 1 year ago

Daniel-Bloom-dfinity commented 2 years ago

Messages can't start with anything other than simple or qualified names.

a message by M{f1: e1, f2: e2, ..., fN: eN}, where M must be a simple or qualified name which resolves to a message type (see Name Resolution)

Name Resolution

... Resolution works as follows. If a.b is a name to be resolved in the context of a protobuf declaration with scope A.B, then resolution is attempted, in order, as A.B.a.b, A.a.b, and finally a.b. To override this behavior, one can use .a.b; this name will only be attempted to be resolved in the root scope, i.e. as a.b.

Also messages are a valid Primary for Member expressions.

A field selection expression, e.f, can be applied both to messages and to maps

TristonianJones commented 1 year ago

/gcbrun