diff options
author | yui-knk <spiketeika@gmail.com> | 2022-10-01 17:53:39 +0900 |
---|---|---|
committer | Yuichiro Kaneko <spiketeika@gmail.com> | 2022-10-08 17:59:11 +0900 |
commit | 3531086095aed9d2898de686bc67ab3a6c2192de (patch) | |
tree | 4113b11d14bf2274076b469ceeef1f72f1ac9cba /parse.y | |
parent | 4bfdf6d06ddbcf21345461038f2a9e3012f77268 (diff) |
"expr_value" can be error
So that "IF" node is kept in the case below
```
def m
if
end
```
[Feature #19013]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6512
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1901,6 +1901,12 @@ expr_value : expr value_expr($1); $$ = $1; } + | error + { + /*%%%*/ + $$ = NEW_ERROR(&@$); + /*% %*/ + } ; expr_value_do : {COND_PUSH(1);} expr_value do {COND_POP();} |