diff options
author | Ryo Nihei <nihei.dev@gmail.com> | 2022-05-13 22:40:50 +0900 |
---|---|---|
committer | Ryo Nihei <nihei.dev@gmail.com> | 2022-05-15 20:42:28 +0900 |
commit | 15ea142b25927d6f103ee6ddde4fe8a5e2324831 (patch) | |
tree | 8c83fc31ac7d5712374ee82681bea87e071c97fd /spec/lexspec.json | |
parent | Stop handling panic to print a stack trace (diff) | |
download | urubu-15ea142b25927d6f103ee6ddde4fe8a5e2324831.tar.gz urubu-15ea142b25927d6f103ee6ddde4fe8a5e2324831.tar.xz |
Prohibit using escape sequences in string literals
Diffstat (limited to 'spec/lexspec.json')
-rw-r--r-- | spec/lexspec.json | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/spec/lexspec.json b/spec/lexspec.json index b8b67f5..caf1f0e 100644 --- a/spec/lexspec.json +++ b/spec/lexspec.json @@ -58,6 +58,11 @@ }, { "modes": ["terminal"], + "kind": "escape_symbol", + "pattern": "\\\\" + }, + { + "modes": ["terminal"], "kind": "terminal_close", "pattern": "\"", "pop": true @@ -70,17 +75,7 @@ { "modes": ["string_literal"], "kind": "char_seq", - "pattern": "[^'\\\\]+" - }, - { - "modes": ["string_literal"], - "kind": "escaped_quot", - "pattern": "\\\\'" - }, - { - "modes": ["string_literal"], - "kind": "escaped_back_slash", - "pattern": "\\\\\\\\" + "pattern": "[^']+" }, { "modes": ["string_literal"], @@ -89,11 +84,6 @@ "pop": true }, { - "modes": ["terminal", "string_literal"], - "kind": "escape_symbol", - "pattern": "\\\\" - }, - { "kind": "colon", "pattern": ":" }, |