rslint_lexer 0.2.0

An extremely fast ECMAScript lexer made for the rslint project
Documentation

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 COMMENT and WHITESPACE tokens.

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. Do not use this to learn how to lex JavaScript, this is just needlessly fast and demonic because i can't control myself :)

basic ANSI syntax highlighting is also offered through the highlight feature.

Warning ⚠️

>> and >>> are not emitted as single tokens, they are emitted as multiple > tokens. This is because of TypeScript parsing and productions such as T<U<N>>