Expand description
Token kinds for Python source code created by the lexer and consumed by the ruff_python_parser.
This module defines the tokens that the lexer recognizes. The tokens are loosely based on the token definitions found in the CPython source.
Structs§
- Token
- Token
Flags - Token
Iter With Context - An iterator over the
Tokens with context. - Tokens
- Tokens represents a vector of lexed
Token.
Enums§
Functions§
- parentheses_
iterator - Returns an iterator over the ranges of the optional parentheses surrounding an expression.
- parenthesized_
range - Returns the
TextRangeof a given expression including parentheses, if the expression is parenthesized; orNone, if the expression is not parenthesized.