spec: pin message-literal source grammar (RFC-001 §5.1) - #108
Merged
Conversation
Expands the `literal` production left open in RFC-001 §5.1 and IETF draft -01 (follow-up from #64 / PR #99, which pinned the carrier): - messageLiteral: optional type name + braced colon-separated field inits — name REQUIRED when the param/field is `any`, OPTIONAL and verified otherwise; never inferred from shape - listLiteral EBNF (used by fixture 10 but previously unpublished) - tight subset, not full textformat: mandatory colon + commas, no trailing comma, fields at most once, repeated via list literals, maps deferred - draft -01: ABNF additions, new Literal Values section, resolved open-issue bullet dropped - grammar.ebnf: schema-extension section (with PXF-divergence notes) - fixture 10 gains the Money message-literal use site; golden 11 locations synced Closes #102
This was referenced Jul 16, 2026
Closed
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pins the source-level spelling of message and list literals (#102) — the follow-up from #64/PR #99, which settled the carrier but left the
literalproduction unexpanded.Grammar
Canonical spelling:
@example(myco.commons.Money{currency: "USD", units: 5}).Decisions
any/google.protobuf.Any; OPTIONAL and compiler-verified against the declared type otherwise; never inferred from the value's shape.:and commas, no trailing comma, each field at most once, unknown field = error. Textformat liberties (colon-less blocks, semicolons, repeated-by-repetition,[type.url]) excluded. Repeated fields take list literals; map fields deferred (compile error in v1.2).qualifiedIdent, linker-resolved (EnumLiteral); lists homogeneous, nestable,[]/{}legal; no expressions inside literals.Acceptance criteria (#102)
literalproduction expanded (message + list) in RFC-001 §5.1 anddocs/grammar.ebnf(new clearly-scoped schema-extension section with PXF-divergence notes)-01grammar section updated (ABNF additions + new Literal Values section; resolved "Literal value shape" open-issue bullet removed)10_literal_args.protogains theMoney{...}use site — golden11_literal_carrier_golden.textproto's previously-orphaned middle entry now has its source counterpart; locations synced (49/54/58)Plus a resolution record under
docs/RFC-001-issues.md§#15 (second commit).Closes #102