diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-19 08:37:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-19 08:37:12 +0000 |
commit | 5399951b008c51d6077d09de53831f1ef2aabf4d (patch) | |
tree | d747c113e9bc9ca5195c1a4d2da23fc97cf62088 /parse.y | |
parent | d34bc779a7f8fc9d8820a8cdeb4a3b5e75958be2 (diff) |
parse.y: ignore do indentations
* parse.y (k_rescue, k_ensure): ignore indentations of `do`, it
is not at the beginning of line usually.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2721,13 +2721,15 @@ k_def : keyword_def k_rescue : keyword_rescue { - token_info_warn(p, "rescue", p->token_info, &@$); + if (p->token_info && strcmp(p->token_info->token, "begin") == 0) + token_info_warn(p, "rescue", p->token_info, &@$); } ; k_ensure : keyword_ensure { - token_info_warn(p, "ensure", p->token_info, &@$); + if (p->token_info && strcmp(p->token_info->token, "begin") == 0) + token_info_warn(p, "ensure", p->token_info, &@$); } ; |