Source context tracking for diagnostics and error reporting in fpx.
This small but critical module defines the context type used throughout the fpx preprocessor to attach precise location information to every diagnostic message, label, or error report.
Every time the preprocessor encounters a problem (undefined macro, include not found, invalid #if expression, unmatched #endif, etc.), it creates or reuses a context object that carries:
This information is then used by the fpx_logging module to produce modern, rustc/clang-style error messages with line numbers, caret highlights (^), and file references.
Without accurate context, diagnostics would be vague ("macro not defined"). With context, users see exactly where the problem happened:
Data Types | |
| type | context |
| Source location and content snapshot for precise diagnostics Instances of this type are created for every source file (including nested include files) and passed along with every warning, error, note, or info message to provide accurate line numbers, file names, and code snippets. More... | |