Skip to main content

Module preprocess

Module preprocess 

Source

Structs§

IncludeTree
One file in the include tree: path, source, parsed root, and parsed included files in order.

Enums§

IncludeError
Error from the include preprocessor.

Functions§

all_files
Flatten the tree into (path, source) for all files (root first, then includes depth-first).
build_include_tree
Build the include tree: parse source as the main file, resolve each include("path"), load and parse those files (with circular include detection), and return the tree.
collect_include_path_ranges
Collect (start_byte, end_byte, path_string) for each include("...") in the file. Used by the LSP to provide document links and go-to-definition on include paths.