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
>>> are not emitted as single tokens, they are emitted as multiple
> tokens. This is because of
TypeScript parsing and productions such as
pub use ansi_term;
Utility macro for creating a SyntaxKind through simple macro syntax
ANSIGenericString includes a generic string type and a
display that string.
ANSIByteString are aliases for
this type on
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.
The string returned will be unaltered if stdout and stderr are not terminals.
Check if a char is a JS linebreak