4 releases
0.1.3 | Jul 29, 2024 |
---|---|
0.1.2 | Jul 26, 2024 |
0.1.1 | Jul 11, 2024 |
0.1.0 | Jul 11, 2024 |
#608 in Development tools
24 downloads per month
310KB
268 lines
reporting
![docs.rs](https://img.shields.io/docsrs/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
~420KB