summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/parse.y b/src/parse.y
index ee95cfb73..8f1241d33 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3459,17 +3459,9 @@ read_escape(parser_state *p)
return c;
case 'b': /* backspace */
- if (is_strterm_type(p, STR_FUNC_REGEXP)) {
- tokadd(p, '\\');
- return 'b';
- }
return '\010';
case 's': /* space */
- if (is_strterm_type(p, STR_FUNC_REGEXP)) {
- tokadd(p, '\\');
- return 's';
- }
return ' ';
case 'M':
@@ -3507,9 +3499,6 @@ read_escape(parser_state *p)
return '\0';
default:
- if (is_strterm_type(p, STR_FUNC_REGEXP)) {
- tokadd(p, '\\');
- }
return c;
}
}
@@ -3583,6 +3572,10 @@ parse_string(parser_state *p)
}
else {
pushback(p, c);
+
+ if(type & STR_FUNC_REGEXP)
+ tokadd(p, '\\');
+
tokadd(p, read_escape(p));
if (hinf)
hinf->line_head = FALSE;