Skip to content

Commit f8489fb

Browse files
committed
Editorial: Link to early error from the relevant grammar productions
It's easy to miss the early error section when reading the grammar. This adds links to the early error section from the grammar productions which have relevant early errors. It's done by breaking up the `<emu-grammar>` into multiple grammars because it is apparently not possible to put a cross-reference into the grammarkdown prose. Closes: #3128
1 parent a10d38d commit f8489fb

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

spec/abstractops.html

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,7 +1108,9 @@ <h1>RFC 9557 / ISO 8601 grammar</h1>
11081108
DateYear :::
11091109
DecimalDigit DecimalDigit DecimalDigit DecimalDigit
11101110
ASCIISign DecimalDigit DecimalDigit DecimalDigit DecimalDigit DecimalDigit DecimalDigit
1111-
1111+
</emu-grammar>
1112+
<p>Note the prohibition on negative zero in <emu-xref href="#sec-temporal-iso8601grammar-static-semantics-early-errors"></emu-xref>.</p>
1113+
<emu-grammar type="definition">
11121114
DateMonth :::
11131115
`0` NonZeroDigit
11141116
`10`
@@ -1129,10 +1131,14 @@ <h1>RFC 9557 / ISO 8601 grammar</h1>
11291131
DateSpecMonthDay :::
11301132
`--`? DateMonth DateSeparator[+Extended] DateDay
11311133
`--`? DateMonth DateSeparator[~Extended] DateDay
1132-
1134+
</emu-grammar>
1135+
<p>Note the prohibition on invalid combinations of month and day in <emu-xref href="#sec-temporal-iso8601grammar-static-semantics-early-errors"></emu-xref>.</p>
1136+
<emu-grammar type="definition">
11331137
DateSpec[Extended] :::
11341138
DateYear DateSeparator[?Extended] DateMonth DateSeparator[?Extended] DateDay
1135-
1139+
</emu-grammar>
1140+
<p>Note the prohibition on invalid combinations of month and day in <emu-xref href="#sec-temporal-iso8601grammar-static-semantics-early-errors"></emu-xref>.</p>
1141+
<emu-grammar type="definition">
11361142
Date :::
11371143
DateSpec[+Extended]
11381144
DateSpec[~Extended]
@@ -1224,7 +1230,9 @@ <h1>RFC 9557 / ISO 8601 grammar</h1>
12241230
AnnotatedTime :::
12251231
TimeDesignator Time DateTimeUTCOffset[~Z]? TimeZoneAnnotation? Annotations?
12261232
Time DateTimeUTCOffset[~Z]? TimeZoneAnnotation? Annotations?
1227-
1233+
</emu-grammar>
1234+
<p>Note the disambiguation between the second alternative without |TimeDesignator|, and |DateSpecMonthDay|/|DateSpecYearMonth| in <emu-xref href="#sec-temporal-iso8601grammar-static-semantics-early-errors"></emu-xref>.</p>
1235+
<emu-grammar type="definition">
12281236
AnnotatedDateTime[Zoned, TimeRequired] :::
12291237
[~Zoned] DateTime[~Z, ?TimeRequired] TimeZoneAnnotation? Annotations?
12301238
[+Zoned] DateTime[+Z, ?TimeRequired] TimeZoneAnnotation Annotations?

0 commit comments

Comments
 (0)