From 75a0869a6cbd558bcae5c32804d24ac1ce7e2ebf Mon Sep 17 00:00:00 2001 From: Thomas Jollans Date: Wed, 11 Dec 2024 01:45:35 +0100 Subject: [PATCH] Clarify raw single-line string grammar (#425) --- SPEC.md | 3 ++- tests/test_cases/expected_kdl/raw_string_just_quote.kdl | 1 - ...aw_string_just_quote.kdl => raw_string_just_quote_fail.kdl} | 0 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 tests/test_cases/expected_kdl/raw_string_just_quote.kdl rename tests/test_cases/input/{raw_string_just_quote.kdl => raw_string_just_quote_fail.kdl} (100%) diff --git a/SPEC.md b/SPEC.md index 7da75de..fbec179 100644 --- a/SPEC.md +++ b/SPEC.md @@ -873,7 +873,8 @@ hex-digit := [0-9a-fA-F] raw-string := '#' raw-string-quotes '#' | '#' raw-string '#' raw-string-quotes := '"' single-line-raw-string-body '"' | '"""' newline multi-line-raw-string-body newline unicode-space*) '"""' -single-line-raw-string-body := (unicode - newline - disallowed-literal-code-points)* +single-line-raw-string-body := '' | (single-line-raw-string-char - '"') single-line-raw-string-char* | '"' (single-line-raw-string-char - '"') single-line-raw-string-char* +single-line-raw-string-char := unicode - newline - disallowed-literal-code-points multi-line-raw-string-body := (unicode - disallowed-literal-code-points)* // Numbers diff --git a/tests/test_cases/expected_kdl/raw_string_just_quote.kdl b/tests/test_cases/expected_kdl/raw_string_just_quote.kdl deleted file mode 100644 index 0a76315..0000000 --- a/tests/test_cases/expected_kdl/raw_string_just_quote.kdl +++ /dev/null @@ -1 +0,0 @@ -node "\"" diff --git a/tests/test_cases/input/raw_string_just_quote.kdl b/tests/test_cases/input/raw_string_just_quote_fail.kdl similarity index 100% rename from tests/test_cases/input/raw_string_just_quote.kdl rename to tests/test_cases/input/raw_string_just_quote_fail.kdl