Skip to content

Commit

Permalink
Called wrong check routine
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed Dec 11, 2024
1 parent ab22393 commit 2056ede
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mathics_scanner/tokeniser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/test_string_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

0 comments on commit 2056ede

Please sign in to comment.