From 73816bbd9a9c0a1ef33ad1d3307ffdf7d117c214 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Tue, 25 Oct 2016 12:36:18 -0500 Subject: [PATCH] Corrected regex to match classes that don't inherit #332 --- libexec/trick/pm/parse_s_define.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/trick/pm/parse_s_define.pm b/libexec/trick/pm/parse_s_define.pm index bef2abe5..5eba08b4 100644 --- a/libexec/trick/pm/parse_s_define.pm +++ b/libexec/trick/pm/parse_s_define.pm @@ -518,7 +518,7 @@ sub handle_sim_class ($$$$) { # grab the class name and the name of the class we are inheriting from ($full_template_args) = $s =~ /template\s+<([^>]+)>/ ; - ($class_name, $inherit_class) = $s =~ /class\s+(\S+)\s*:\s*public\s*(.*\S)/ ; + ($class_name, $inherit_class) = $s =~ /class\s+(\S+)\s*(?::\s*public\s*(.*\S))?/ ; $template_args = $full_template_args ; $template_args =~ s/class|typename//g ;