| 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; |