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

Method PreVisitRewrite

eval/public/ast_rewrite_test.cc:556–562  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

554 public:
555 PreRewriterExample() {}
556 bool PreVisitRewrite(Expr* expr, const SourcePosition* info) override {
557 if (expr->ident_expr().name() == "x") {
558 expr->mutable_ident_expr()->set_name("y");
559 return true;
560 }
561 return false;
562 }
563
564 bool PostVisitRewrite(Expr* expr, const SourcePosition* info) override {
565 if (expr->ident_expr().name() == "y") {

Callers

nothing calls this directly

Calls 2

nameMethod · 0.45
set_nameMethod · 0.45

Tested by

no test coverage detected