summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index b2bbafe123..abedadb7d7 100644
--- a/parse.y
+++ b/parse.y
@@ -836,7 +836,13 @@ static void token_info_pop(struct parser_params*, const char *token, const rb_co
%type <id> f_kwrest f_label f_arg_asgn call_op call_op2 reswords relop dot_or_colon
%token END_OF_INPUT 0 "end-of-input"
%token <id> '.'
+/* escaped chars, should be ignored otherwise */
%token <id> '\\' "backslash"
+%token <id> ' ' "escaped space"
+%token <id> '\t' "escaped horizontal tab"
+%token <id> '\f' "escaped form feed"
+%token <id> '\r' "escaped carriage return"
+%token <id> '\13' "escaped vertical tab"
%token tUPLUS RUBY_TOKEN(UPLUS) "unary+"
%token tUMINUS RUBY_TOKEN(UMINUS) "unary-"
%token tPOW RUBY_TOKEN(POW) "**"
@@ -8095,6 +8101,7 @@ parser_yylex(struct parser_params *p)
dispatch_scan_event(p, tSP);
goto retry; /* skip \\n */
}
+ if (ISSPACE(c)) return c;
pushback(p, c);
return '\\';