| Crates.io | power-tokenizer |
| lib.rs | power-tokenizer |
| version | 0.3.0 |
| created_at | 2022-11-22 02:10:13.50053+00 |
| updated_at | 2022-11-27 00:06:24.932873+00 |
| description | converts JS/TS code into tokens |
| homepage | |
| repository | https://github.com/minsk-dev/power |
| max_upload_size | |
| id | 720569 |
| size | 19,675 |
power-tokenizerthis is both a cli and a library.
tokenizes a string of characters. based on ECMAScript.
assumes you have cargo/rustup installed.
cargo install power-tokenizer
power-tokenizer "const one_plus_one = 1 + 1"
expected output:
Const
Identifier(
[
'o',
'n',
'e',
'_',
'p',
'l',
'u',
's',
'_',
'o',
'n',
'e',
],
)
Assign
Identifier(
[
'1',
],
)
Plus
Identifier(
[
'1',
],
)
EndOfFile