RX0184

Domain: Parsing

Error message

an unknown escape in a text literal: %s

In the message, %s marks a value that the engine fills in when it raises the error.

The story

Inside a single quoted text, you wrote a backslash followed by a character that is not a real escape. In rush, a single quoted text understands exactly five escapes: backslash n for a new line, backslash t for a tab, backslash r for a carriage return, two backslashes for one backslash, and backslash apostrophe for an apostrophe. Backslash zero is refused separately. Anything else, like backslash q, or the backslash d of a regular expression, names no escape at all. The old engine would silently drop the backslash and keep the letter, so a text written as a backslash q b would print as aqb. Your text changed, and nobody told you. Now it is refused at parse, and the message names the escape and the line. What should you do? If you really want a backslash, write two. And if you are writing a regular expression, a Windows path, or a literal bracket, use the raw double quoted form, which decodes nothing. Then your text comes out exactly as you typed it.

Text from the Rush engine's error catalogue.