Skip to content

Commit a2ef6bb

Browse files
authored
Clean up quoted-pattern definition (#921)
* Clean up `quoted-pattern` definition `complex-body` was already always prefixed by optional space, so in that case there was effectively two subsequent optional spaces: that is unnecessary. It is much cleaner to remove the optional leading space from the `quoted-pattern` definition, and instead move it to explicitly before `quoted-pattern` in `variant`. This change is purely editorial and has no normative impact. * fix
1 parent db82a8b commit a2ef6bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spec/message.abnf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ complex-body = quoted-pattern / matcher
1212
input-declaration = input o variable-expression
1313
local-declaration = local s variable o "=" o expression
1414

15-
quoted-pattern = o "{{" pattern "}}"
15+
quoted-pattern = "{{" pattern "}}"
1616

1717
matcher = match-statement s variant *(o variant)
1818
match-statement = match 1*(s selector)
1919
selector = variable
20-
variant = key *(s key) quoted-pattern
20+
variant = key *(s key) o quoted-pattern
2121
key = literal / "*"
2222

2323
; Expressions

spec/syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ A _quoted pattern_ starts with a sequence of two U+007B LEFT CURLY BRACKET `{{`
274274
and ends with a sequence of two U+007D RIGHT CURLY BRACKET `}}`.
275275

276276
```abnf
277-
quoted-pattern = o "{{" pattern "}}"
277+
quoted-pattern = "{{" pattern "}}"
278278
```
279279

280280
A _quoted pattern_ MAY be empty.
@@ -449,7 +449,7 @@ Each _key_ is separated from each other by whitespace.
449449
Whitespace is permitted but not required between the last _key_ and the _quoted pattern_.
450450
451451
```abnf
452-
variant = key *(s key) quoted-pattern
452+
variant = key *(s key) o quoted-pattern
453453
key = literal / "*"
454454
```
455455

0 commit comments

Comments
 (0)