API reference
python:irx:irx.diagnostics
module diagnostics
irx.diagnostics
Source: packages/irx/src/irx/diagnostics.py:1
Shared diagnostics and source-location helpers.
Provide one small diagnostics foundation that semantic analysis, lowering, native compilation, linking, and runtime feature resolution can all share.
Classes
-
Diagnostic — One structured diagnostic record.
-
DiagnosticBag — Collect diagnostics across one semantic-analysis attempt.
-
DiagnosticCodeFormatter — Render logical diagnostic identifiers with one configurable prefix.
-
DiagnosticCodes — Stable logical diagnostic identifiers.
-
DiagnosticRelatedInformation — One secondary diagnostic location or note.
-
IRxDiagnosticError — Raised when one non-semantic compiler phase emits a diagnostic.
-
LinkingError — Raised when final executable linking fails.
-
LoweringError — Raised when lowering fails with one structured diagnostic.
-
NativeCompileError — Raised when native artifact compilation fails.
-
RuntimeFeatureError — Raised when runtime feature activation or symbol resolution fails.
-
SemanticError — Raised when semantic analysis fails.
-
SourceLocation — One best-effort source location.
Functions
-
format_diagnostic_code — Render one logical diagnostic identifier.
-
format_source_location — Format one module-aware source location.
-
get_diagnostic_code_formatter — Return the active diagnostic-code formatter.
-
get_node_module_key — Return one AST node's best-effort module attribution.
-
get_node_source_location — Return one AST node's best-effort source location.
-
set_diagnostic_code_formatter — Replace the process-wide diagnostic-code formatter.
-
set_diagnostic_code_prefix — Configure the process-wide diagnostic-code prefix.
-
source_location_from_loc — Convert one arbitrary location-like object to SourceLocation.