highlight_sexp

Function highlight_sexp 

Source
pub fn highlight_sexp(src: &str, cursor_pos: Option<usize>) -> String
Expand description

Render src with ANSI colours: keywords, literals, numbers, comments, quotes, and brackets each get their own colour.

If cursor_pos is Some(b), byte-offset b is treated as the cursor. If b lands on a bracket whose match exists, both brackets render with BOLD + BRACK. Other brackets render with plain BRACK.