class documentation

Single token with type, string value, and source position.

Method __repr__ Return a debug representation of the token.
Method copy Return a shallow copy of the token.
Method unquote Convert a quoted key token into a plain key token.
Instance Variable pos Character position in the input.
Instance Variable type Token type.
Instance Variable value Raw token value.
def __repr__(self) -> str: (source)

Return a debug representation of the token.

def copy(self) -> Token: (source)

Return a shallow copy of the token.

def unquote(self) -> Token: (source)

Convert a quoted key token into a plain key token.

Returns
TokenToken with unquoted value.
Raises
ParseErrorIf the token cannot be unquoted to a string.

Character position in the input.

Token type.

Raw token value.