powr-tokenizer 0.3.0

converts JS/TS code into tokens. part of the power project.
Documentation
  • Coverage
  • 0%
    0 out of 120 items documented0 out of 5 items with examples
  • Size
  • Source code size: 19.72 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 646.23 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 7s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • powrjs/powr
    21 3 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • voidcoefficient

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