splat 0.1.0

Error handling and highlighting for source files.
Documentation

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
    │