mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fix a bug that :_1 to cause syntax error; fix #5295
This commit is contained in:
@@ -6308,7 +6308,7 @@ parser_yylex(parser_state *p)
|
||||
break;
|
||||
|
||||
case '_':
|
||||
if (toklen(p) == 2 && ISDIGIT(tok(p)[1]) && p->nvars) {
|
||||
if (p->lstate != EXPR_FNAME && toklen(p) == 2 && ISDIGIT(tok(p)[1]) && p->nvars) {
|
||||
int n = tok(p)[1] - '0';
|
||||
int nvar;
|
||||
|
||||
|
||||
+3487
-3441
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user