Skip to main content

highlight_rust

Function highlight_rust 

Source
pub fn highlight_rust(text: &str) -> Vec<(usize, usize, Semantic)>
Expand description

The colored stretches of Rust code, as char indices. It reads tokens, not syntax, so it never fails: unfinished strings and comments color to the end.