5 releases
0.1.4 | Nov 2, 2024 |
---|---|
0.1.3 | Jul 29, 2024 |
0.1.2 | Jul 26, 2024 |
0.1.1 | Jul 11, 2024 |
0.1.0 | Jul 11, 2024 |
#692 in Development tools
133 downloads per month
310KB
264 lines
reporting
Simple diagnostic reporting for compilers.
use reporting::{error, note, File, Location, Renderer, Styles};
fn main() {
let file = File::new("test.txt", "import stds;");
let styles = Styles::styled();
print!(
"{}",
Renderer::new(
&styles,
&[
error!("Could not find package `{}`", "stds")
.location(Location::new(file.clone(), 7)),
note!("Perhaps you meant `std`?")
]
)
)
}
lib.rs
:
Simple diagnostic reporting for compilers.
use reporting::{error, note, File, Location, Renderer, Styles};
let file = File::new("test.txt", "import stds;");
let styles = Styles::styled();
print!(
"{}",
Renderer::new(
&styles,
&[
error!("Could not find package `{}`", "stds")
.location(Location::new(file.clone(), 7)),
note!("Perhaps you meant `std`?")
]
)
);
Dependencies
~1.5MB
~23K SLoC