Skip to main content

Module syntax

Module syntax 

Source

Structs§

PythonOverloadDecoratorBindings

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.
leftmost_identifier
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 node is the label of a keyword argument: the x in f(x=1).
python_node_is_in_annotation
Whether node is 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 None means exhaustion; Some(None) means the receiver is not static.