diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-06-02 13:01:29 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-06-02 13:01:29 +0900 |
| commit | 31e30686b0bd9333eb0593fb1fb43b9b99744517 (patch) | |
| tree | 7604d3923ee246fb8d995e31ef1428c66b7cac34 /mrbgems/mruby-compiler/core/parse.y | |
| parent | 563036eaba5c158d524682fb5fb295caa3acd596 (diff) | |
| download | mruby-31e30686b0bd9333eb0593fb1fb43b9b99744517.tar.gz mruby-31e30686b0bd9333eb0593fb1fb43b9b99744517.zip | |
Update NODE_BLOCK check logic in `void_expr_error`.
Diffstat (limited to 'mrbgems/mruby-compiler/core/parse.y')
| -rw-r--r-- | mrbgems/mruby-compiler/core/parse.y | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mrbgems/mruby-compiler/core/parse.y b/mrbgems/mruby-compiler/core/parse.y index 2c1a943be..61b6ea214 100644 --- a/mrbgems/mruby-compiler/core/parse.y +++ b/mrbgems/mruby-compiler/core/parse.y @@ -3474,12 +3474,11 @@ void_expr_error(parser_state *p, node *n) void_expr_error(p, n->cdr->cdr); break; case NODE_BEGIN: - if (n->cdr) { - while (n->cdr) { - n = n->cdr; - } - void_expr_error(p, n->car); + n = n->cdr; + while (n->cdr) { + n = n->cdr; } + void_expr_error(p, n->car); break; default: break; |
