Releases: Hejsil/mecha
Releases · Hejsil/mecha
0.10.0
mecha
release 0.10.0
which compiles and works for zig 0.14.0
Features
- Add
mecha.unionInit
Changes
- The result of parsers have changed
- Whether a parser succeeded in parsing the string is now returned in
Result
instead of aserror.ParserFailed
- To get out the result, you now have to unwrap the
value
union, which is eitherok: T
orerr
- To get out the result, you now have to unwrap the
Result
now also contains anindex
instead ofrest
which contains the amount of progress made into the string- For success, this is the end of how much was parsed
- For error, this is where parsing failed
- Whether a parser succeeded in parsing the string is now returned in
- Allow
mecha.toStruct
to wrap a single valueT
in a struct with one field of typeT
(struct { field: T }
)