power-tokenizer

Crates.iopower-tokenizer
lib.rspower-tokenizer
version0.3.0
sourcesrc
created_at2022-11-22 02:10:13.50053
updated_at2022-11-27 00:06:24.932873
descriptionconverts JS/TS code into tokens
homepage
repositoryhttps://github.com/minsk-dev/power
max_upload_size
id720569
size19,675
Marla Albuquerque (marlalain)

documentation

README

power-tokenizer

this is both a cli and a library.

tokenizes a string of characters. based on ECMAScript.

installing

assumes you have cargo/rustup installed.

cargo install power-tokenizer

running

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

Commit count: 186

cargo fmt