summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index abedadb7d7f..89c65992c45 100644
--- a/parse.y
+++ b/parse.y
@@ -838,7 +838,7 @@ static void token_info_pop(struct parser_params*, const char *token, const rb_co
%token <id> '.'
/* escaped chars, should be ignored otherwise */
%token <id> '\\' "backslash"
-%token <id> ' ' "escaped space"
+%token tSPACE "escaped space"
%token <id> '\t' "escaped horizontal tab"
%token <id> '\f' "escaped form feed"
%token <id> '\r' "escaped carriage return"
@@ -8101,6 +8101,7 @@ parser_yylex(struct parser_params *p)
dispatch_scan_event(p, tSP);
goto retry; /* skip \\n */
}
+ if (c == ' ') return tSPACE;
if (ISSPACE(c)) return c;
pushback(p, c);
return '\\';