Is there a crate to do Rust-style syntax error highlighting? Like with the ^^^^^ squiggles but as a standalone crate for use with any string? I could've sworn there was, but wondering if I'm just thinking of quote_spanned! for proc macros https://docs.rs/quote/1.0.2/quote/macro.quote_spanned.html#example …
Actually, do you maybe have an example of where you're using it? I'm wondering how to map this back to Error / ErrorKind pairs to get better log output. E.g. it'd be cool if we could go from TOML errors like on the left to clearer errors like on the right.pic.twitter.com/wOvIvNSV2y
-
-
I'm definitely not using it the way it is intended to be used but I don't understand the API and just wanted to get something working quickly https://github.com/gleam-lang/gleam/blob/3e570e683fb53855dda88ba59d55d184d76aca7f/src/error.rs#L698-L712 …
-
Yeah, struggling with the API as well. https://twitter.com/philhansch/status/1203979755009323008 … seems very promising too!
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.