Skip to content

Commit

Permalink
Add explicit definition for BlockString (#1042)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Sep 8, 2023
1 parent 6b7c2c4 commit 3adfcca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion spec/Appendix B -- Grammar Summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ StringValue ::

- `""` [lookahead != `"`]
- `"` StringCharacter+ `"`
- `"""` BlockStringCharacter\* `"""`
- BlockString

StringCharacter ::

Expand All @@ -121,6 +121,8 @@ HexDigit :: one of

EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t`

BlockString :: `"""` BlockStringCharacter\* `"""`

BlockStringCharacter ::

- SourceCharacter but not `"""` or `\"""`
Expand Down
10 changes: 8 additions & 2 deletions spec/Section 2 -- Language.md
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ StringValue ::

- `""` [lookahead != `"`]
- `"` StringCharacter+ `"`
- `"""` BlockStringCharacter\* `"""`
- BlockString

StringCharacter ::

Expand All @@ -827,6 +827,8 @@ HexDigit :: one of

EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t`

BlockString :: `"""` BlockStringCharacter\* `"""`

BlockStringCharacter ::

- SourceCharacter but not `"""` or `\"""`
Expand Down Expand Up @@ -1007,7 +1009,11 @@ StringCharacter :: `\` EscapedCharacter
| {`r`} | U+000D | carriage return |
| {`t`} | U+0009 | horizontal tab |

StringValue :: `"""` BlockStringCharacter\* `"""`
StringValue :: BlockString

- Return the _Unicode text_ by evaluating the {BlockString}.

BlockString :: `"""` BlockStringCharacter\* `"""`

- Let {rawValue} be the _Unicode text_ by concatenating the evaluation of all
{BlockStringCharacter} (which may be an empty sequence).
Expand Down

0 comments on commit 3adfcca

Please sign in to comment.