original_docstring: 
          Create a literal from the token at the top of the parse tree.
  
          ..  todo:: Use type provider conversions from string to CEL type objects.
          
docstring: Create a literal from the token at the top of the parse tree.
  todo:: Use type provider conversions from string to CEL type objects.
docstring_tokens: Create a literal from the token at the top of the parse tree . todo :: Use type provider conversions from string to CEL type objects .
code: def literal(self, tree: lark.Tree) -> Result:
          """
          Create a literal from the token at the top of the parse tree.
  
          ..  todo:: Use type provider conversions from string to CEL type objects.
          """
          if len(tree.children) != 1:
              raise CELSyntaxError(
                  f"{tree.data} {tree.children}: bad literal node",
                  line=tree.line,
                  column=tree.column,
              )
          value_token = tree.children[0]
          try:
              result: Result
              if value_token.type == "FLOAT_LIT":
                  result = celpy.celtypes.DoubleType(value_token.value)
              elif value_token.type == "INT_LIT":
                  result = celpy.celtypes.IntType(value_token.value)
              elif value_token.type == "UINT_LIT":
                  if not value_token.value[-1].lower() == 'u':
                      raise CELSyntaxError(
                          f"invalid unsigned int literal {value_token!r}",
                          line=tree.line,
                          column=tree.column,
                      )
                  result = celpy.celtypes.UintType(value_token.value[:-1])
              elif value_token.type in ("MLSTRING_LIT", "STRING_LIT"):
                  result = celstr(value_token)
              elif value_token.type == "BYTES_LIT":
                  result = celbytes(value_token)
              elif value_token.type == "BOOL_LIT":
                  result = (
                      celpy.celtypes.BoolType(value_token.value.lower() == "true")
                  )
              elif value_token.type == "NULL_LIT":
                  result = None
              else:
                  raise CELUnsupportedError(
                      f"{tree.data} {tree.children}: type not implemented",
                      line=tree.line,
                      column=tree.column,
                  )
          except ValueError as ex:
              result = CELEvalError(ex.args[0], ex.__class__, ex.args, tree=tree)
  
          return result
code_tokens: def literal ( self , tree : lark . Tree ) -> Result : if len ( tree . children ) != 1 : raise CELSyntaxError ( f"{tree.data} {tree.children}: bad literal node" , line = tree . line , column = tree . column , ) value_token = tree . children [ 0 ] try : result : Result if value_token . type == "FLOAT_LIT" : result = celpy . celtypes . DoubleType ( value_token . value ) elif value_token . type == "INT_LIT" : result = celpy . celtypes . IntType ( value_token . value ) elif value_token . type == "UINT_LIT" : if not value_token . value [ - 1 ] . lower ( ) == 'u' : raise CELSyntaxError ( f"invalid unsigned int literal {value_token!r}" , line = tree . line , column = tree . column , ) result = celpy . celtypes . UintType ( value_token . value [ : - 1 ] ) elif value_token . type in ( "MLSTRING_LIT" , "STRING_LIT" ) : result = celstr ( value_token ) elif value_token . type == "BYTES_LIT" : result = celbytes ( value_token ) elif value_token . type == "BOOL_LIT" : result = ( celpy . celtypes . BoolType ( value_token . value . lower ( ) == "true" ) ) elif value_token . type == "NULL_LIT" : result = None else : raise CELUnsupportedError ( f"{tree.data} {tree.children}: type not implemented" , line = tree . line , column = tree . column , ) except ValueError as ex : result = CELEvalError ( ex . args [ 0 ] , ex . __class__ , ex . args , tree = tree ) return result
short_docstring: Create a literal from the token at the top of the parse tree.
short_docstring_tokens: Create a literal from the token at the top of the parse tree .
comment: """
          Create a literal from the token at the top of the parse tree.
  
          ..  todo:: Use type provider conversions from string to CEL type objects.
          """