|
Let us walk on the 3-isogeny graph
|
Data Structures | |
| class | _TokenType |
Functions | |
| is_token_subtype (ttype, other) | |
| string_to_tokentype (s) | |
Variables | |
| Token = _TokenType() | |
| Text = Token.Text | |
| Whitespace = Text.Whitespace | |
| Escape = Token.Escape | |
| Error = Token.Error | |
| Other = Token.Other | |
| Keyword = Token.Keyword | |
| Name = Token.Name | |
| Literal = Token.Literal | |
| String = Literal.String | |
| Number = Literal.Number | |
| Punctuation = Token.Punctuation | |
| Operator = Token.Operator | |
| Comment = Token.Comment | |
| Generic = Token.Generic | |
| dict | STANDARD_TYPES |
pygments.token
~~~~~~~~~~~~~~
Basic token types and the standard tokens.
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
| is_token_subtype | ( | ttype, | |
| other | |||
| ) |
Return True if ``ttype`` is a subtype of ``other``. exists for backwards compatibility. use ``ttype in other`` now.
Definition at line 85 of file token.py.
| string_to_tokentype | ( | s | ) |
Convert a string into a token type::
>>> string_to_token('String.Double')
Token.Literal.String.Double
>>> string_to_token('Token.Literal.Number')
Token.Literal.Number
>>> string_to_token('')
Token
Tokens that are already tokens are returned unchanged:
>>> string_to_token(String)
Token.Literal.String
Definition at line 94 of file token.py.
References i.
| Token = _TokenType() |