MCPcopy Create free account
hub / github.com/comaps/comaps / MatchesByName

Function MatchesByName

libs/search/retrieval.cpp:162–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160
161template <typename DFA>
162pair<bool, bool> MatchesByName(vector<UniString> const & tokens, vector<DFA> const & dfas)
163{
164 for (auto const & dfa : dfas)
165 {
166 for (auto const & token : tokens)
167 {
168 auto it = dfa.Begin();
169 DFAMove(it, token);
170 if (it.Accepts())
171 return {true, it.ErrorsMade() == 0};
172 }
173 }
174
175 return {false, false};
176}
177
178template <typename DFA>
179pair<bool, bool> MatchesByType(feature::TypesHolder const & types, vector<DFA> const & dfas)

Callers 1

Calls 4

DFAMoveFunction · 0.85
BeginMethod · 0.45
AcceptsMethod · 0.45
ErrorsMadeMethod · 0.45

Tested by

no test coverage detected