summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-compiler/core/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-12-24 23:30:42 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-12-24 23:30:42 +0900
commit825c14a0c5e86cc2d33a3f70d3be846660d466f6 (patch)
tree1b0638725926b67645338dbcb578ad3d07f437da /mrbgems/mruby-compiler/core/parse.y
parent2850b58dd98dad75158326eb5e8318f65630fe7e (diff)
downloadmruby-825c14a0c5e86cc2d33a3f70d3be846660d466f6.tar.gz
mruby-825c14a0c5e86cc2d33a3f70d3be846660d466f6.zip
Reset paren_nest at tAREF and tASET.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
-rw-r--r--mrbgems/mruby-compiler/core/parse.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y
index 16e1cef32..e4a3b9f28 100644
--- a/mrbgems/mruby-compiler/core/parse.y
+++ b/mrbgems/mruby-compiler/core/parse.y
@@ -5844,6 +5844,7 @@ parser_yylex(parser_state *p)
p->paren_nest++;
if (p->lstate == EXPR_FNAME || p->lstate == EXPR_DOT) {
p->lstate = EXPR_ARG;
+ p->paren_nest--;
if ((c = nextc(p)) == ']') {
if ((c = nextc(p)) == '=') {
return tASET;