Closed runfalk closed 2 years ago
Great Thanks!
@runfalk the new parser fails when parsing quick-protobuf/tests/rust_protobuf/common/mesos.proto
./pb-rs ../../quick-protobuf/tests/rust_protobuf/common/mesos.proto
pb-rs fatal error No message or enum were read;either definition might be invalid or there were only unsupported structures
Nom 3 is a bit old now and I was curious enough to try my hands at modernizing the parser. I've tried to copy the old structure as much as possible but in some cases I simplified it/condensed some functions. All tests and the benchmarks seems to run fine, but this one likely requires a bit more thorough review than my previous uplift.
The one "breaking" change here is that the file is parsed as UTF-8 rather than bytes (but it seems like proto files must be utf-8 anyway https://github.com/protocolbuffers/protobuf/issues/1418).