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 possible Result
Ok(Some(token))Match is foundOk(None)End of sourceErr(error)An error occurs
tokenize_all possible Result
Ok(Vec<Tokens>)Tokens are foundErr(error)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.5 milliseconds
6.0.4is ~421%faster than version4.0.1
7.0.2is ~5%faster than version7.0.1