Skip to main content

Module syntax

Module syntax 

Source

Structs§

MacroReplacementField
One direct field declaration recovered from an object-like macro replacement. The replacement is parsed as the body of a synthetic struct, so the name and declaration text come from C/C++ grammar nodes rather than from a textual macro expansion.
MacroReplacementTypeReference
ObjectMacroReplacement
The structured content of one object-like field-list macro replacement: the members it declares itself, and the names of the field-list macros it composes in turn. Composition is kept as names rather than resolved here because a nested name’s active replacement is a property of the preprocessor environment at the invocation, not of this replacement.
QualifiedCallableValue
RecoveredAggregateField
One member declaration recovered from an aggregate region tree-sitter could not place. range is the member’s own byte range in the original source.

Functions§

explicit_qualified_callable_value
Recognize an explicit address-of qualified callable value such as &Owner::method or &namespace::Owner::method.
function_macro_included_ranges
Hide grammar-owned comments inside function-like replacements from the primary parser. Otherwise tree-sitter can terminate preproc_arg at the comment and read the rest of the directive as surrounding C/C++ code. Replacement analysis still reads the original source and reparses the full logical span; included ranges preserve every original byte coordinate.
function_macro_replacement_span
The complete logical-line replacement list of a function-like #define.
is_cpp_recovered_callable_declaration_reference
Whether an identifier is a callable declaration name retained beneath C++ error recovery.
object_macro_replacement
Recover direct fields hidden in an object-like macro replacement.
object_macro_replacement_span
The complete replacement list of an object-like #define.
object_macro_replacement_type_references
Recover type-bearing syntax hidden inside an object-like macro replacement.
qualified_callable_value
Recognize a qualified callable used as an expression value.
recovered_aggregate_fields
Recover the direct members of an aggregate body region the ordinary parse could not place.