jayce
jayce is a tokenizer 🌌
Example
use ;
use Regex;
const SOURCE: &str = "Excalibur = 5000$; // Your custom lang";
lazy_static! ;
Result
Token
Token
Token
Token
Info
next returns a Result with 3 possible values
Ok(Some(token))If a match is foundOk(None)Reaching the source endsErr(error)When an error occurs
tokenize_all returns a Result with 2 possible values
Ok(tokens)If all tokens are foundErr(error)When an error occurs
Note
whitespaces, comments and block comments are skipped for performance reasons
Performances
initialization in 1.83 nanoseconds
tokenization of 19 979 tokens in 3.69 milliseconds
version 6.0.4 is
420.65%faster than version 4.0.1