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

Method PostVisitRewrite

eval/public/ast_rewrite_test.cc:505–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503 public:
504 RewriterExample() {}
505 bool PostVisitRewrite(Expr* expr, const SourcePosition* info) override {
506 if (target_.has_value() && expr->id() == *target_) {
507 expr->mutable_ident_expr()->set_name("com.google.Identifier");
508 return true;
509 }
510 return false;
511 }
512
513 void PostVisitIdent(const Ident* ident, const Expr* expr,
514 const SourcePosition* pos) override {

Callers

nothing calls this directly

Calls 3

has_valueMethod · 0.45
idMethod · 0.45
set_nameMethod · 0.45

Tested by

no test coverage detected