Structs§
Functions§
- decorator_
callee - Return a decorator’s callable expression, peeling an optional invocation.
- expression_
name_ node - Return the name-bearing node of a Python expression using tree-sitter fields.
- is_
declaration_ identifier - leftmost_
identifier - python_
attribute_ callee_ names_ enclosing_ nested_ class_ bounded - Whether an attribute callee names a nested class in its enclosing class.
- python_
attribute_ callee_ uses_ self_ or_ cls_ bounded - Whether an attribute call uses the conventional Python receiver name.
- python_
attribute_ names_ nested_ class_ through_ current_ receiver_ bounded - Whether an attribute expression reaches a nested class of the enclosing
class through
selforcls. Instance writes or subclass overrides can shadow such a class, so no single class answers for it. - python_
conditional_ expression_ operands - The operands of a Python conditional expression (
value if test else alternative). - python_
deferred_ annotation_ identifier_ ranges - Parse one exactly mapped deferred annotation and return its identifier ranges.
- python_
deferred_ annotation_ tree - Parse one quoted annotation expression while preserving its original source byte coordinates. Literal string values and arbitrary strings are rejected by the same structured gate used by inverse membership.
- python_
keyword_ argument_ label - Whether
nodeis the label of a keyword argument: thexinf(x=1). - python_
node_ can_ be_ reference - Whether a named node can carry a Python source reference at the selected range.
Soft keywords used as names parse as
keyword_identifier, and deferred annotation strings can name a reference even without an identifier node. - python_
node_ is_ in_ annotation - Whether
nodeis contained by a parser field that Python evaluates as an annotation rather than as an ordinary expression. - python_
plain_ string_ literal - The text one plain string literal denotes.
- python_
reference_ is_ deferred_ function_ body - python_
reference_ is_ deferred_ function_ body_ bounded - Body containment under the caller’s sticky traversal budget.
- python_
static_ attribute_ path - The identifier nodes in one static Python value path, from root to leaf.
- python_
static_ attribute_ path_ bounded - The strict static attribute path proof, charging traversal and reversal. Parentheses remain outside this API’s admitted grammar.
- python_
static_ type_ path - The identifier nodes in one static Python annotation name, root to leaf. Wrappers and generic arguments are ignored while the named generic origin remains part of the path.
- python_
static_ value_ path_ bounded - A metered static value path, including transparent parentheses. The outer
Nonemeans exhaustion;Some(None)means the receiver is not static.