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

Method PostVisitIdent

eval/public/ast_rewrite_test.cc:513–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511 }
512
513 void PostVisitIdent(const Ident* ident, const Expr* expr,
514 const SourcePosition* pos) override {
515 if (path_.size() >= 3) {
516 if (ident->name() == "com") {
517 const Expr* p1 = path_.at(path_.size() - 2);
518 const Expr* p2 = path_.at(path_.size() - 3);
519
520 if (p1->has_select_expr() && p1->select_expr().field() == "google" &&
521 p2->has_select_expr() &&
522 p2->select_expr().field() == "Identifier") {
523 target_ = p2->id();
524 }
525 }
526 }
527 }
528
529 void TraversalStackUpdate(absl::Span<const Expr*> path) override {
530 path_ = path;

Callers

nothing calls this directly

Calls 6

atMethod · 0.80
has_select_exprMethod · 0.80
sizeMethod · 0.45
nameMethod · 0.45
fieldMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected