From abfb2a799a18bc549ddae04bc623e5489617d3f5 Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Tue, 29 Aug 2023 16:51:35 +0100 Subject: [PATCH 1/2] Add explicit definition for BlockString --- spec/Appendix B -- Grammar Summary.md | 4 +++- spec/Section 2 -- Language.md | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/spec/Appendix B -- Grammar Summary.md b/spec/Appendix B -- Grammar Summary.md index 2291ee35f..92f222cb3 100644 --- a/spec/Appendix B -- Grammar Summary.md +++ b/spec/Appendix B -- Grammar Summary.md @@ -100,7 +100,7 @@ StringValue :: - `""` [lookahead != `"`] - `"` StringCharacter+ `"` -- `"""` BlockStringCharacter\* `"""` +- BlockString StringCharacter :: @@ -121,6 +121,8 @@ HexDigit :: one of EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t` +BlockString :: `"""` BlockStringCharacter\* `"""` + BlockStringCharacter :: - SourceCharacter but not `"""` or `\"""` diff --git a/spec/Section 2 -- Language.md b/spec/Section 2 -- Language.md index 1aca650a8..b8aa536eb 100644 --- a/spec/Section 2 -- Language.md +++ b/spec/Section 2 -- Language.md @@ -806,7 +806,7 @@ StringValue :: - `""` [lookahead != `"`] - `"` StringCharacter+ `"` -- `"""` BlockStringCharacter\* `"""` +- BlockString StringCharacter :: @@ -827,6 +827,8 @@ HexDigit :: one of EscapedCharacter :: one of `"` `\` `/` `b` `f` `n` `r` `t` +BlockString :: `"""` BlockStringCharacter\* `"""` + BlockStringCharacter :: - SourceCharacter but not `"""` or `\"""` @@ -1007,7 +1009,9 @@ StringCharacter :: `\` EscapedCharacter | {`r`} | U+000D | carriage return | | {`t`} | U+0009 | horizontal tab | -StringValue :: `"""` BlockStringCharacter\* `"""` +StringValue :: BlockString + +BlockString :: `"""` BlockStringCharacter\* `"""` - Let {rawValue} be the _Unicode text_ by concatenating the evaluation of all {BlockStringCharacter} (which may be an empty sequence). From 17c75f854df78f3dd361a8557ab54def7011697d Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Tue, 29 Aug 2023 16:57:10 +0100 Subject: [PATCH 2/2] Add command for 'StringValue :: BlockString' --- spec/Section 2 -- Language.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/Section 2 -- Language.md b/spec/Section 2 -- Language.md index b8aa536eb..3ac7c7e60 100644 --- a/spec/Section 2 -- Language.md +++ b/spec/Section 2 -- Language.md @@ -1011,6 +1011,8 @@ StringCharacter :: `\` EscapedCharacter StringValue :: BlockString +- Return the _Unicode text_ by evaluating the {BlockString}. + BlockString :: `"""` BlockStringCharacter\* `"""` - Let {rawValue} be the _Unicode text_ by concatenating the evaluation of all