reformation
Parsing via regular expressions using format syntax
Deriving trait Reformation will also implement
trait FromStr, with Err=Box<Error>
Derive will require attribute reformation to specify format string, which will be treated as format string -> regular expression string
Types implementing Reformation by default:
- signed integers:
i8i16i32i64i128isize - unsigned integers:
u8u16u32u64u128usize - floats:
f32f64 String
use Reformation;
Format string behaves as regular expression, so special symbols needs to be escaped.
Also they can be used for more flexible format strings.
AVOID capture groups, since they would mess up with indexing of capture group
generated by macro. use non-capturing groups r"(?:)" instead.
use Reformation;
// '{' is special symbol in both format and regex syntax, so it must be escaped twice.
// Say hello to good old escape hell.