Vtable marker should identify struct

This commit is contained in:
disinvite 2023-12-02 18:57:23 -05:00
parent cbeb4168e0
commit cbc6105b57
2 changed files with 3 additions and 2 deletions

View File

@ -66,11 +66,11 @@ def is_marker_exact(line: str) -> bool:
template_class_decl_regex = re.compile(
r"\s*(?:\/\/)?\s*class (\w+)<([\w]+)\s*(\*+)?\s*>"
r"\s*(?:\/\/)?\s*(?:class|struct) (\w+)<([\w]+)\s*(\*+)?\s*>"
)
class_decl_regex = re.compile(r"\s*(?:\/\/)?\s*class (\w+)")
class_decl_regex = re.compile(r"\s*(?:\/\/)?\s*(?:class|struct) (\w+)")
def get_class_name(line: str) -> str | None:

View File

@ -100,6 +100,7 @@ def test_marker_dict_type_replace():
class_name_match_cases = [
("struct MxString {", "MxString"),
("class MxString {", "MxString"),
("// class MxString", "MxString"),
("class MxString : public MxCore {", "MxString"),