MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / SourceRangeFromParserRuleContext

Function SourceRangeFromParserRuleContext

parser/parser.cc:142–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142SourceRange SourceRangeFromParserRuleContext(
143 const antlr4::ParserRuleContext* context) {
144 SourceRange range;
145 if (context != nullptr) {
146 if (auto start = context->getStart() != nullptr
147 ? context->getStart()->getStartIndex()
148 : INVALID_INDEX;
149 start != INVALID_INDEX) {
150 range.begin = static_cast<int32_t>(start);
151 }
152 if (auto end = context->getStop() != nullptr
153 ? context->getStop()->getStopIndex()
154 : INVALID_INDEX;
155 end != INVALID_INDEX) {
156 range.end = static_cast<int32_t>(end + 1);
157 }
158 }
159 return range;
160}
161
162} // namespace
163

Callers 15

visitMethod · 0.85
visitPrimaryExprMethod · 0.85
visitMemberExprMethod · 0.85
visitConditionalOrMethod · 0.85
visitConditionalAndMethod · 0.85
visitRelationMethod · 0.85
visitCalcMethod · 0.85
visitUnaryMethod · 0.85
NormalizeIdentifierMethod · 0.85
visitSelectMethod · 0.85
visitMemberCallMethod · 0.85
visitIndexMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected