Crate palex

Source
Expand description

A fast, small, dependency-free crate for lexing command-line arguments. You can use this crate if you want to build your own argument parsing library.

This crate is almost zero-cost, since it parses arguments lazily and avoids most heap allocations. There’s no dynamic dispatch.

Check the examples folder for examples.

Modules§

  • Helper structs for checking if the next token matches your expectations and consuming the token thereupon.

Structs§

Enums§

Traits§

  • The trait for types that can produce tokens from a list of command-line arguments.