Skip to content

Commit

Permalink
match "using" and "typedef"
Browse files Browse the repository at this point in the history
  • Loading branch information
tringi committed Sep 11, 2022
1 parent 2b40b2e commit f82f7be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions agsearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ namespace {
{ &agsearch::parameter_set::match_ifs_and_conditional, { L"if", L"?" } },
{ &agsearch::parameter_set::match_class_struct_typename, { L"class", L"struct", L"typename" } },
{ &agsearch::parameter_set::match_float_and_double_decl, { L"float", L"double" } },
{ &agsearch::parameter_set::match_using_and_typedef, { L"using", L"typedef" } },
};
static const std::set <alternative_spelling> alternative_spellings_optional = {
{ &agsearch::parameter_set::match_ifs_and_conditional, { L"else", L":" } },
Expand Down
3 changes: 3 additions & 0 deletions agsearch.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class agsearch {
bool match_any_inheritance_type = true;
bool match_any_integer_decl_style = true;
bool match_float_and_double_decl = true;
bool match_using_and_typedef = false;

// TODO: matching different int declarations (rather than through ignored_patterns)
// TODO: reorder "const volatile", "static inline",
Expand Down Expand Up @@ -153,6 +154,8 @@ class agsearch {
double decimal = 0.0;
};

static const auto xxx = sizeof (token);

protected:

// pattern
Expand Down
1 change: 1 addition & 0 deletions test/SearchTest.rc
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
1032 "Match any inheritance type (if omitted)"
1033 "Match any compatible integer declaration style"
1034 "Match float && double when searching for the other"
1035 "Match using and typedef"
}

0 comments on commit f82f7be

Please sign in to comment.