diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-04 11:59:19 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-02-04 11:59:19 +0000 |
commit | 83a9ccb0f2aee9f84bab7972dc1567c7a248452e (patch) | |
tree | c7c0296f190f3393603fc3f961f98759a65bc9e8 /tool | |
parent | ed935aa5be0e5e6b8d53c3e7d76a9ce395dfa18b (diff) | |
download | ruby-83a9ccb0f2aee9f84bab7972dc1567c7a248452e.tar.gz |
Fix typos and remove redundant `/#{}/`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r-- | tool/transform_mjit_header.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb index 4c3377b18f..a58b173d7f 100644 --- a/tool/transform_mjit_header.rb +++ b/tool/transform_mjit_header.rb @@ -52,11 +52,11 @@ module MJITHeader def self.decl_name_of(decl) ident_regex = /\w+/ decl = decl.gsub(/^#.+$/, '') # remove macros - reduced_decl = decl.gsub(/#{ATTR_REGEXP}/, '') # remove attributes + reduced_decl = decl.gsub(ATTR_REGEXP, '') # remove attributes su1_regex = /{[^{}]*}/ - su2_regex = /{([^{}]|su1_regex)*}/ - su3_regex = /{([^{}]|su2_regex)*}/ # 3 nested structs/unions is probably enough - reduced_decl.gsub!(/#{su3_regex}/, '') # remove strutcs/unions in the header + su2_regex = /{([^{}]|#{su1_regex})*}/ + su3_regex = /{([^{}]|#{su2_regex})*}/ # 3 nested structs/unions is probably enough + reduced_decl.gsub!(su3_regex, '') # remove structs/unions in the header id_seq_regex = /\s*(#{ident_regex}(\s+|\s*[*]+\s*))*/ # Process function header: match = /\A#{id_seq_regex}(?<name>#{ident_regex})\s*\(/.match(reduced_decl) |