Skip to main content
Fragments of a concatenated string containing stringified Tokens.

Initializers


Methods


add_escape

kindRequired

  • Type: str

add_intrinsic

Adds an intrinsic fragment.

valueRequired

  • Type: typing.Any
the intrinsic value to add.

add_literal

Adds a literal fragment.

litRequired

  • Type: typing.Any
the literal to add.

add_token

Adds a token fragment.

tokenRequired

the token to add.

concat

otherRequired


join

Combine the string fragments using the given joiner. If there are any

concatRequired


map_tokens

Apply a transformation function to all tokens in the string.

contextRequired


Properties


escapesRequired

Return all escape fragments from this string.

first_valueRequired

  • Type: typing.Any
Returns the first value.

intrinsicRequired

Return all intrinsic fragments from this string.

lengthRequired

  • Type: typing.Union[int, float]
Returns the number of fragments.

literalsRequired

Return all literals from this string.

tokensRequired

Return all Tokens from this string.

first_tokenOptional

Returns the first token.