original_docstring: 
      Evaluate a CEL string literal, expanding escapes to create a Python string.
  
      It may be that built-in ``eval()`` might work for some of this, but
      the octal escapes aren't really viable.
  
      :param token: CEL token value
      :return: str
  
      ..  todo:: This can be refactored into celpy.celtypes.StringType.
      
docstring: Evaluate a CEL string literal, expanding escapes to create a Python string.
  It may be that built-in ``eval()`` might work for some of this, but
  the octal escapes aren't really viable.
docstring_tokens: Evaluate a CEL string literal expanding escapes to create a Python string . It may be that built - in ` ` eval () ` ` might work for some of this but the octal escapes aren ' t really viable .
code: def celstr(token: lark.Token) -> celpy.celtypes.StringType:
      """
      Evaluate a CEL string literal, expanding escapes to create a Python string.
  
      It may be that built-in ``eval()`` might work for some of this, but
      the octal escapes aren't really viable.
  
      :param token: CEL token value
      :return: str
  
      ..  todo:: This can be refactored into celpy.celtypes.StringType.
      """
      def expand(match_iter: Iterable[Match[str]]) -> Iterator[str]:
          for match in (m.group() for m in match_iter):
              if len(match) == 1:
                  expanded = match
              elif match[:2] == r'\x':
                  expanded = chr(int(match[2:], 16))
              elif match[:2] in {r'\u', r'\U'}:
                  expanded = chr(int(match[2:], 16))
              elif match[:1] == '\\' and len(match) == 4:
                  expanded = chr(int(match[1:], 8))
              else:
                  expanded = CEL_ESCAPES.get(match, match)
              yield expanded
  
      text = token.value
      if text[:1] in ("R", "r"):
          # Raw; ignore ``\`` escapes
          if text[1:4] == '"""' or text[1:4] == "'''":
              # Long
              expanded = text[4:-3]
          else:
              # Short
              expanded = text[2:-1]
      else:
          # Cooked; expand ``\`` escapes
          if text[0:3] == '"""' or text[0:3] == "'''":
              # Long
              match_iter = CEL_ESCAPES_PAT.finditer(text[3:-3])
          else:
              # Short
              match_iter = CEL_ESCAPES_PAT.finditer(text[1:-1])
          expanded = ''.join(expand(match_iter))
      return celpy.celtypes.StringType(expanded)
code_tokens: def celstr ( token : lark . Token ) -> celpy . celtypes . StringType : def expand ( match_iter : Iterable [ Match [ str ] ] ) -> Iterator [ str ] : for match in ( m . group ( ) for m in match_iter ) : if len ( match ) == 1 : expanded = match elif match [ : 2 ] == r'\x' : expanded = chr ( int ( match [ 2 : ] , 16 ) ) elif match [ : 2 ] in { r'\u' , r'\U' } : expanded = chr ( int ( match [ 2 : ] , 16 ) ) elif match [ : 1 ] == '\\' and len ( match ) == 4 : expanded = chr ( int ( match [ 1 : ] , 8 ) ) else : expanded = CEL_ESCAPES . get ( match , match ) yield expanded text = token . value if text [ : 1 ] in ( "R" , "r" ) : if text [ 1 : 4 ] == '"""' or text [ 1 : 4 ] == "'''" : expanded = text [ 4 : - 3 ] else : expanded = text [ 2 : - 1 ] else : if text [ 0 : 3 ] == '"""' or text [ 0 : 3 ] == "'''" : match_iter = CEL_ESCAPES_PAT . finditer ( text [ 3 : - 3 ] ) else : match_iter = CEL_ESCAPES_PAT . finditer ( text [ 1 : - 1 ] ) expanded = '' . join ( expand ( match_iter ) ) return celpy . celtypes . StringType ( expanded )
short_docstring: Evaluate a CEL string literal, expanding escapes to create a Python string.
short_docstring_tokens: Evaluate a CEL string literal expanding escapes to create a Python string .
comment: """
      Evaluate a CEL string literal, expanding escapes to create a Python string.
  
      It may be that built-in ``eval()`` might work for some of this, but
      the octal escapes aren't really viable.
  
      :param token: CEL token value
      :return: str
  
      ..  todo:: This can be refactored into celpy.celtypes.StringType.
      """$SEP$# Raw; ignore ``\`` escapes$SEP$# Long$SEP$# Short$SEP$# Cooked; expand ``\`` escapes$SEP$# Long$SEP$# Short