You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments