| 263 | |
| 264 | // Return ptr to the AST node representing the given Expr protobuf node. |
| 265 | const NodeType* absl_nullable FindExpr( |
| 266 | const ExprType* absl_nonnull expr) const { |
| 267 | auto it = metadata_->expr_to_node.find(expr); |
| 268 | if (it == metadata_->expr_to_node.end()) { |
| 269 | return nullptr; |
| 270 | } |
| 271 | return it->second; |
| 272 | } |
| 273 | |
| 274 | // The root of the AST. |
| 275 | const NodeType& Root() const { return *metadata_->nodes[0]; } |