From 2056edef96447beb3d74b581ca6a75ab7d059968 Mon Sep 17 00:00:00 2001 From: rocky Date: Wed, 11 Dec 2024 13:54:49 -0500 Subject: [PATCH] Called wrong check routine --- mathics_scanner/tokeniser.py | 2 +- test/test_string_tokens.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mathics_scanner/tokeniser.py b/mathics_scanner/tokeniser.py index 90a41f4..97802da 100644 --- a/mathics_scanner/tokeniser.py +++ b/mathics_scanner/tokeniser.py @@ -586,7 +586,7 @@ def t_String(self, match: re.Match) -> Token: # "\\" have the backslash preserved. But for other # characters, the backslash is removed. if self.code[self.pos + 1] not in ( - "b", # bell? + "b", # word boundary? "f", # form-feed? "n", # newline "r", # carrage return diff --git a/test/test_string_tokens.py b/test/test_string_tokens.py index 9e73a55..52e0524 100644 --- a/test/test_string_tokens.py +++ b/test/test_string_tokens.py @@ -64,4 +64,4 @@ def test_string(): check_string(r'"a\"b\\c"', r'"a\"b\\c"') incomplete_error(r'"abc', "String does not have terminating quote") incomplete_error(r'"\"', "Unterminated escape sequence") - incomplete_error(r'"a\X"', '"X" is not a valid escape character') + scan_error(r'"a\X"', '"X" is not a valid escape character')