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

Method visitBytes

parser/parser.cc:1372–1381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1370}
1371
1372std::any ParserVisitor::visitBytes(CelParser::BytesContext* ctx) {
1373 auto status_or_value = cel::internal::ParseBytesLiteral(ctx->tok->getText());
1374 if (!status_or_value.ok()) {
1375 return ExprToAny(factory_.ReportError(SourceRangeFromParserRuleContext(ctx),
1376 status_or_value.status().message()));
1377 }
1378 return ExprToAny(factory_.NewBytesConst(
1379 factory_.NextId(SourceRangeFromParserRuleContext(ctx)),
1380 std::move(status_or_value).value()));
1381}
1382
1383std::any ParserVisitor::visitBoolTrue(CelParser::BoolTrueContext* ctx) {
1384 return ExprToAny(factory_.NewBoolConst(

Callers

nothing calls this directly

Calls 10

ParseBytesLiteralFunction · 0.85
ExprToAnyFunction · 0.85
getTextMethod · 0.80
messageMethod · 0.80
okMethod · 0.45
ReportErrorMethod · 0.45
NewBytesConstMethod · 0.45
NextIdMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected