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

Method Parse

libs/search/tracer.cpp:15–28  ·  view source on GitHub ↗

Tracer::Parse -----------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

13{
14// Tracer::Parse -----------------------------------------------------------------------------------
15Tracer::Parse::Parse(vector<TokenType> const & types, bool category) : m_category(category)
16{
17 size_t i = 0;
18 while (i != types.size())
19 {
20 auto const type = types[i];
21 auto j = i + 1;
22 while (j != types.size() && types[j] == type)
23 ++j;
24 if (type < TokenType::TOKEN_TYPE_COUNT)
25 m_ranges[type] = TokenRange(i, j);
26 i = j;
27 }
28}
29
30Tracer::Parse::Parse(vector<pair<TokenType, TokenRange>> const & ranges, bool category) : m_category(category)
31{

Callers 1

SearchCoordinatesMethod · 0.45

Calls 2

TokenRangeClass · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected