Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement support for repeated fields in constants
This adds support for repeated fields in constants. Until know the following was failing with a parsing error: ```protobuf optional uint64 my_field = 1 [ (my_option) = { my_option_repeated_field: ["foo", "bar"] } ]; ``` This is valid for `protoc` and it's covered in the specification, but the parser wasn't accepting the `["foo", "bar"]` syntax for assigning a value to the repeated field. Some refactoring was required to implement this. Particularly, the functions `option_value_field_to_unknown_value` and `option_value_message_to_unknown_value`, which returned `UnknownValue`, now receive a mutable `UnknownFields` and add new fields to it. These function where renamed to more appropriate names.
- Loading branch information