jayce
Jayce is a tokenizer 🌌
Example
use ;
use Regex;
// Your token kind names and their regexes
lazy_static!
// Source to tokenize
const SOURCE: &str = "Excalibur = 5000$";
Result
Token
Token
Token
Info
peek only returns a TokenizerResult
next returns a TokenizerResult and advances the source cursor
TokenizerResult can be
Found(token)If a regex matchesError(line, column)When nothing matchesEndReaching the source ends
Performances
Whitespaces, block comments and comments are skipped by default for performance reasons
Initialization in 1.87 nanoseconds
Tokenization of 49 516 428 tokens in 3.69 milliseconds
version 6.0.4 is
420.65%faster than version 4.0.1