Skip to main content

Module highlight

Module highlight 

Source
Expand description

Split source text into classified spans for syntax highlighting.

This uses the lexer in the mode the formatter does, so it keeps whitespace and comments and copes with source that does not compile.

Structs§

Token
A classified span of source.

Enums§

Class
The class of a Token.

Functions§

highlight
Classify all of source.