Feat: add structured diagnostics with yansi colors
Introduces fluxc/src/diagnostics.rs with Level (Critical, Error, Warning, Note), Label (Primary/Secondary with optional message), and Diagnostic types. Diagnostic::render(src, filename) produces rustc-style output: colored header, --> file:line:col pointer, source line with gutter, and ^ / - underlines aligned to the offending span. Replaces the flat ParseError struct in the parser; all five error sites now emit Diagnostic values with source-pointing labels.
This commit is contained in:
4
examples/invalid.flx
Normal file
4
examples/invalid.flx
Normal file
@@ -0,0 +1,4 @@
|
||||
fn main() {
|
||||
let a : 12 = 3;
|
||||
return -;
|
||||
}
|
||||
Reference in New Issue
Block a user