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.
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 self or cls. 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 node is the label of a keyword argument: the x in f(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 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.