original_docstring: 
          member         : member_dot | member_dot_arg | member_item | member_object | primary
  
          member_dot     : member "." IDENT
          member_dot_arg : member "." IDENT "(" [exprlist] ")"
          member_item    : member "[" expr "]"
          member_object  : member "{" [fieldinits] "}"
  
          https://github.com/google/cel-spec/blob/master/doc/langdef.md#name-resolution
  
          -   ``primary``: Variables and Functions: some simple names refer to variables in the
              execution context, standard functions, or other name bindings provided by the CEL
              application.
  
          -   ``member_dot``: Field selection: appending a period and identifier to an expression
              could indicate that we're accessing a field within a protocol buffer or map.
              See below for **Field Selection**.
  
          -   ``member_dot``: Protocol buffer package names: a simple or qualified name could
              represent an absolute or relative name in the protocol buffer package namespace.
              Package names must be followed by a message type, enum type, or enum constant.
  
          -   ``member_dot``: Protocol buffer message types, enum types, and enum constants:
              following an optional protocol buffer package name, a simple or qualified name
              could refer to a message type, and enum type, or an enum constant in the package's
              namespace.
  
          Field Selection. There are four cases.
  
          https://github.com/google/cel-spec/blob/master/doc/langdef.md#field-selection
  
          - If e evaluates to a message
            and f is not declared in this message, the runtime error no_such_field is raised.
  
          - If e evaluates to a message
            and f is declared, but the field is not set,
            the default value of the field's type will be produced.
  
          - If e evaluates to a map, then e.f is equivalent to e['f'].
  
          - In all other cases, e.f evaluates to an error.
  
          TODO: implement member "." IDENT for messages.
          
docstring: 
  
  
  
  ``primary``: Variables and Functions: some simple names refer to variables in the
  execution context, standard functions, or other name bindings provided by the CEL
  application.
  
  ``member_dot``: Field selection: appending a period and identifier to an expression
  could indicate that we're accessing a field within a protocol buffer or map.
  See below for **Field Selection**.
  
  ``member_dot``: Protocol buffer package names: a simple or qualified name could
  represent an absolute or relative name in the protocol buffer package namespace.
  Package names must be followed by a message type, enum type, or enum constant.
  
  ``member_dot``: Protocol buffer message types, enum types, and enum constants:
  following an optional protocol buffer package name, a simple or qualified name
  could refer to a message type, and enum type, or an enum constant in the package's
  namespace.
  
  Field Selection. There are four cases.
  
  
  
  If e evaluates to a message
  and f is not declared in this message, the runtime error no_such_field is raised.
  
  If e evaluates to a message
  and f is declared, but the field is not set,
  the default value of the field's type will be produced.
  
  If e evaluates to a map, then e.f is equivalent to e['f'].
  
  In all other cases, e.f evaluates to an error.
  
  implement member "." IDENT for messages.
docstring_tokens: ` ` primary ` ` : Variables and Functions : some simple names refer to variables in the execution context standard functions or other name bindings provided by the CEL application . ` ` member_dot ` ` : Field selection : appending a period and identifier to an expression could indicate that we ' re accessing a field within a protocol buffer or map . See below for ** Field Selection ** . ` ` member_dot ` ` : Protocol buffer package names : a simple or qualified name could represent an absolute or relative name in the protocol buffer package namespace . Package names must be followed by a message type enum type or enum constant . ` ` member_dot ` ` : Protocol buffer message types enum types and enum constants : following an optional protocol buffer package name a simple or qualified name could refer to a message type and enum type or an enum constant in the package ' s namespace . Field Selection . There are four cases . If e evaluates to a message and f is not declared in this message the runtime error no_such_field is raised . If e evaluates to a message and f is declared but the field is not set the default value of the field ' s type will be produced . If e evaluates to a map then e . f is equivalent to e [ ' f ' ] . In all other cases e . f evaluates to an error . implement member " . " IDENT for messages .
code: def member_dot(self, tree: lark.Tree) -> Result:
          """
          member         : member_dot | member_dot_arg | member_item | member_object | primary
  
          member_dot     : member "." IDENT
          member_dot_arg : member "." IDENT "(" [exprlist] ")"
          member_item    : member "[" expr "]"
          member_object  : member "{" [fieldinits] "}"
  
          https://github.com/google/cel-spec/blob/master/doc/langdef.md#name-resolution
  
          -   ``primary``: Variables and Functions: some simple names refer to variables in the
              execution context, standard functions, or other name bindings provided by the CEL
              application.
  
          -   ``member_dot``: Field selection: appending a period and identifier to an expression
              could indicate that we're accessing a field within a protocol buffer or map.
              See below for **Field Selection**.
  
          -   ``member_dot``: Protocol buffer package names: a simple or qualified name could
              represent an absolute or relative name in the protocol buffer package namespace.
              Package names must be followed by a message type, enum type, or enum constant.
  
          -   ``member_dot``: Protocol buffer message types, enum types, and enum constants:
              following an optional protocol buffer package name, a simple or qualified name
              could refer to a message type, and enum type, or an enum constant in the package's
              namespace.
  
          Field Selection. There are four cases.
  
          https://github.com/google/cel-spec/blob/master/doc/langdef.md#field-selection
  
          - If e evaluates to a message
            and f is not declared in this message, the runtime error no_such_field is raised.
  
          - If e evaluates to a message
            and f is declared, but the field is not set,
            the default value of the field's type will be produced.
  
          - If e evaluates to a map, then e.f is equivalent to e['f'].
  
          - In all other cases, e.f evaluates to an error.
  
          TODO: implement member "." IDENT for messages.
          """
          member_tree, property_name_token = tree.children
          member = self.visit(member_tree)
          property_name = property_name_token.value
          result: Result
          if isinstance(member, CELEvalError):
              result = member
          elif isinstance(member, celpy.celtypes.MapType):
              # Syntactic sugar: a.b is a["b"] when a is a mapping.
              if property_name in member:
                  result = member[property_name]
              else:
                  err = f"no such key: {property_name!r}"
                  result = CELEvalError(err, KeyError, None, tree=tree)
          # elif isinstance(member, celpy.celtypes.MessageType):
          # elif isinstance(member, celpy.celtypes.PackageType):
          elif isinstance(member, dict):
              # Navigation through names provided as external run-time bindings.
              # The dict is the value of a Referent that was part of a namespace path.
              if property_name in member:
                  result = member[property_name]
              else:
                  err = f"no such key: {property_name!r}"
                  result = CELEvalError(err, KeyError, None, tree=tree)
          else:
              err = f"type: '{type(member)}' does not support field selection"
              result = CELEvalError(err, TypeError, None, tree=tree)
          return result
code_tokens: def member_dot ( self , tree : lark . Tree ) -> Result : member_tree , property_name_token = tree . children member = self . visit ( member_tree ) property_name = property_name_token . value result : Result if isinstance ( member , CELEvalError ) : result = member elif isinstance ( member , celpy . celtypes . MapType ) : if property_name in member : result = member [ property_name ] else : err = f"no such key: {property_name!r}" result = CELEvalError ( err , KeyError , None , tree = tree ) elif isinstance ( member , dict ) : if property_name in member : result = member [ property_name ] else : err = f"no such key: {property_name!r}" result = CELEvalError ( err , KeyError , None , tree = tree ) else : err = f"type: '{type(member)}' does not support field selection" result = CELEvalError ( err , TypeError , None , tree = tree ) return result
short_docstring: member         : member_dot | member_dot_arg | member_item | member_object | primary
  member_dot     : member "."
short_docstring_tokens: member : member_dot | member_dot_arg | member_item | member_object | primary member_dot : member " . "
comment: """
          member         : member_dot | member_dot_arg | member_item | member_object | primary
  
          member_dot     : member "." IDENT
          member_dot_arg : member "." IDENT "(" [exprlist] ")"
          member_item    : member "[" expr "]"
          member_object  : member "{" [fieldinits] "}"
  
          https://github.com/google/cel-spec/blob/master/doc/langdef.md#name-resolution
  
          -   ``primary``: Variables and Functions: some simple names refer to variables in the
              execution context, standard functions, or other name bindings provided by the CEL
              application.
  
          -   ``member_dot``: Field selection: appending a period and identifier to an expression
              could indicate that we're accessing a field within a protocol buffer or map.
              See below for **Field Selection**.
  
          -   ``member_dot``: Protocol buffer package names: a simple or qualified name could
              represent an absolute or relative name in the protocol buffer package namespace.
              Package names must be followed by a message type, enum type, or enum constant.
  
          -   ``member_dot``: Protocol buffer message types, enum types, and enum constants:
              following an optional protocol buffer package name, a simple or qualified name
              could refer to a message type, and enum type, or an enum constant in the package's
              namespace.
  
          Field Selection. There are four cases.
  
          https://github.com/google/cel-spec/blob/master/doc/langdef.md#field-selection
  
          - If e evaluates to a message
            and f is not declared in this message, the runtime error no_such_field is raised.
  
          - If e evaluates to a message
            and f is declared, but the field is not set,
            the default value of the field's type will be produced.
  
          - If e evaluates to a map, then e.f is equivalent to e['f'].
  
          - In all other cases, e.f evaluates to an error.
  
          TODO: implement member "." IDENT for messages.
          """$SEP$# Syntactic sugar: a.b is a["b"] when a is a mapping.$SEP$# elif isinstance(member, celpy.celtypes.MessageType):$SEP$# elif isinstance(member, celpy.celtypes.PackageType):$SEP$# Navigation through names provided as external run-time bindings.$SEP$# The dict is the value of a Referent that was part of a namespace path.