From f7f8dc5fd47bcd79e8e46cd321ad0dec9e0ec5cd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 30 Jan 2020 11:31:48 +0900 Subject: [PATCH] Unnamed groups are not captured when named groups are used --- tool/transform_mjit_header.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb index 5f89446c81..ed837486a7 100644 --- a/tool/transform_mjit_header.rb +++ b/tool/transform_mjit_header.rb @@ -105,7 +105,7 @@ module MJITHeader 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*))*/ + id_seq_regex = /\s*(?:#{ident_regex}(?:\s+|\s*[*]+\s*))*/ # Process function header: match = /\A#{id_seq_regex}(?#{ident_regex})\s*\(/.match(reduced_decl) return match[:name] if match