1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Decode-relevant option interpretation: lift the fixed, hardcoded set of built-in options that
// affect decoding into typed AST fields, in place. Everything else stays raw (option names are not
// resolved; values stay as the parsed text-format tree). No descriptor.proto dependency.
//
// Interpreted here:
// [packed = true/false] -> FieldNode::repeated_encoding (repeated fields)
// proto2 [default = X] -> FieldNode::default_value
// Warned about (never rejected):
// option message_set_wire_format = true; -> a diagnostic appended to `warnings`, if given. The
// message decodes as unknown fields: a MessageSet holds only extensions, which no emitter
// materializes anyway.
//
// FeatureSet options (field_presence/enum_type/repeated_field_encoding/message_encoding) are
// handled earlier by resolve_features; group syntax sets is_group/Delimited at parse time.
//
// Precondition: compute_fqns has run (the message_set_wire_format warning names FQNs). [packed]
// gates on scalar.hpp's is_packable_scalar -- pure spelling, no resolution needed. The composed
// `analyze()` (resolve.hpp) runs all the passes in the right order.
// namespace rapidproto