| 127 | } |
| 128 | |
| 129 | SourceRange SourceRangeFromToken(const antlr4::Token* token) { |
| 130 | SourceRange range; |
| 131 | if (token != nullptr) { |
| 132 | if (auto start = token->getStartIndex(); start != INVALID_INDEX) { |
| 133 | range.begin = static_cast<int32_t>(start); |
| 134 | } |
| 135 | if (auto end = token->getStopIndex(); end != INVALID_INDEX) { |
| 136 | range.end = static_cast<int32_t>(end + 1); |
| 137 | } |
| 138 | } |
| 139 | return range; |
| 140 | } |
| 141 | |
| 142 | SourceRange SourceRangeFromParserRuleContext( |
| 143 | const antlr4::ParserRuleContext* context) { |
no outgoing calls
no test coverage detected