tokay-lang / tokay

Tokay is a programming language designed for ad-hoc parsing, inspired by awk.
https://tokay.dev
MIT License
239 stars 7 forks source link

Use of `num-parse` to parse integers #65

Closed phorward closed 2 years ago

phorward commented 2 years ago

The num-parse-crate was established from the requirement that there is no existing JavaScript-like parseInt() or parseFloat() method in Rust.

This crate is developed apart from Tokay, but Tokay makes both use of it in terms of the internal string-to-int-conversion functions as well as the Int-token. For this case, the Reader needed to be modified to implement PeekableIterator from num-parse to use equal parsing features in all cases.

num-parse will be extended to support a parse_float() as well, which will be integrated into Tokay as well then.