An extremely fast, lookup table based, ECMAScript lexer which yields SyntaxKind tokens used by the rslint_parse parser.
For the purposes of error recovery, tokens may have an error attached to them, which is reflected in the Iterator Item.
The lexer will also yield
The lexer operates on raw bytes to take full advantage of lookup table optimizations, these bytes must be valid utf8,
therefore making a lexer from a
&[u8] is unsafe since you must make sure the bytes are valid utf8.
basic ANSI syntax highlighting is also offered through the
Utility macro for creating a SyntaxKind through simple macro syntax
An extremely fast, lookup table based, lossless ECMAScript lexer
A style is a collection of properties that can format a string using ANSI escape codes.
A single raw token such as
A colour is one specific type of ANSI escape code, and can refer to either the foreground or background colour.
The kind of syntax node, e.g.
Colors a piece of source code using ANSI.
Check if a char is a JS linebreak