Mercurial > hg > Members > anatofuz > MoarVM
changeset 38:2c51389684ca
fix duplication right blanket
author | Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Nov 2018 18:08:17 +0900 |
parents | 5b66cfffe9cd |
children | 9b496a0c430a |
files | cbctools/change_OP_to_cbc.pl |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cbctools/change_OP_to_cbc.pl Fri Nov 16 17:55:10 2018 +0900 +++ b/cbctools/change_OP_to_cbc.pl Fri Nov 16 18:08:17 2018 +0900 @@ -91,6 +91,12 @@ insert_right_blanket(); next; } + + if ($cbc_lines[$i] =~ /{/){ + $i++; + $none_left_blanket = 1; + next; + } } # 普通の行は変換してinsertする @@ -104,7 +110,9 @@ if ($i != scalar(@cbc_lines)-1 && $cbc_lines[$i+1] =~ /OP/ && $none_left_blanket){ + if ($cbc_lines[$i] !~ /\s*}\s*/ ){ insert_right_blanket(); + } $none_left_blanket = 0; } }