This lightweight, dependency-free rust library provides a convenient way to read characters from different resources.
For now, the following resources are supported:
* std::fs::File
* std::io::Stdin
This library is particularly useful when implementing handwritten lexers, because on one hand, we read characters one at a time in code and on the other hand, we may need the following features:
All these features are implemented in charwise
. Abstraction from the source is done via generics to eliminate the possible overhead of static dispatching.
In order to use charwise
, simply add
charwise = "*"
to your Cargo.toml
file.
(will be added shortly)