Skip to content

Commit e924cc1

Browse files
eemeliaphillips
andauthored
Clarify that Duplicate Option Name is a data model error (#577)
* Clarify that Duplicate Option Name is a data model error * Apply suggestions from code review Co-authored-by: Addison Phillips <[email protected]> * Update spec/syntax.md Good callout Co-authored-by: Eemeli Aro <[email protected]> --------- Co-authored-by: Addison Phillips <[email protected]>
1 parent c9c68a1 commit e924cc1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

spec/formatting.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,6 @@ The result of resolving _option_ values is a mapping of string identifiers to va
245245
For each _option_:
246246
247247
- Resolve the _identifier_ of the _option_.
248-
- If the _option_'s _identifier_ already exists in the resolved mapping of _options_,
249-
emit a Duplicate Option Name error.
250248
- If the _option_'s right-hand side successfully resolves to a value,
251249
bind the _identifier_ of the _option_ to the resolved value in the mapping.
252250
- Otherwise, bind the _identifier_ of the _option_ to an unresolved value in the mapping.

spec/syntax.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ Attempting to parse a _message_ that is not _well-formed_ will result in a _Synt
8989

9090
A _message_ is **_<dfn>valid</dfn>_** if it is _well-formed_ and
9191
**also** meets the additional content restrictions
92-
and semantic requirements about its structure defined below.
92+
and semantic requirements about its structure defined below for
93+
_declarations_, _matcher_ and _options_.
9394
Attempting to parse a _message_ that is not _valid_ will result in a _Data Model Error_.
9495

9596
## The Message
@@ -535,7 +536,10 @@ optional whitespace.
535536
The value of an _option_ can be either a _literal_ or a _variable_.
536537
537538
Multiple _options_ are permitted in an _annotation_.
538-
Each _option_ is separated by whitespace.
539+
_Options_ are separated from the preceding _function_ _identifier_
540+
and from each other by whitespace.
541+
Each _option_'s _identifier_ MUST be unique within the _annotation_:
542+
an _annotation_ with duplicate _option_ _identifiers_ is not valid.
539543
540544
```abnf
541545
option = identifier [s] "=" [s] (literal / variable)

0 commit comments

Comments
 (0)