Tracer::Parse -----------------------------------------------------------------------------------
| 13 | { |
| 14 | // Tracer::Parse ----------------------------------------------------------------------------------- |
| 15 | Tracer::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 | |
| 30 | Tracer::Parse::Parse(vector<pair<TokenType, TokenRange>> const & ranges, bool category) : m_category(category) |
| 31 | { |
no test coverage detected