splat

Crates.iosplat
lib.rssplat
version0.1.0
sourcesrc
created_at2020-05-20 04:29:11.650454
updated_at2020-05-20 04:29:11.650454
descriptionError handling and highlighting for source files.
homepage
repository
max_upload_size
id243671
size25,047
(wtfsophia)

documentation

README

Splat 0.1

Simple error handling and highlighting for source files.

Usage

let mut src = Source::new("my-file.txt", "The quick brown fox...");

src.add_message(0..0, "All of my problems start here.");
src.add_message(4..8, "Turns out this isn't quick.");
src.add_message(16..18, "And it's not a fox!");

// Pretty print the messages:
println!("{}", src);

Output

#1 - All of my problems start here.
     my-file.txt:1:1

#2 - Turns out this isn't quick.
     my-file.txt:1:5

#3 - And it's not a fox!
     my-file.txt:1:17

  1 │ The quick brown fox...
    │ │   ├───┘       │ │
    │ │   │           ├─┘
    │ 1   2           3
    │
Commit count: 0

cargo fmt