jayce
Jayce is a tokenizer 🌌
Example
use ;
use lazy_static;
use Regex;
// Your token kind names and their regexes
lazy_static!
// Source to tokenize
const SOURCE: &str = "Excalibur = 5000$";
Result
Token
Token
Token
Info
next returns a TokenizerResult which can be
Found(token)If a regex matchesError(line, column)When nothing matchesEndReaching the source ends
Note
Whitespaces, block comments and comments are skipped by default
Performances
Initialization 3.0881 nanoseconds
99.999%faster than version 4.0.1
Tokenization of vulkan-triangle in 2.2010 nanoseconds
7.6013%faster than version 4.0.1