| 63 | } |
| 64 | |
| 65 | std::string KindToString(const NavigableProtoAstNode& node) { |
| 66 | if (node.parent_relation() != ChildKind::kUnspecified && |
| 67 | node.parent()->expr()->has_comprehension_expr()) { |
| 68 | const cel::expr::Expr::Comprehension& comp = |
| 69 | node.parent()->expr()->comprehension_expr(); |
| 70 | if (node.expr()->id() == comp.iter_range().id()) return "IterRange"; |
| 71 | if (node.expr()->id() == comp.accu_init().id()) return "AccuInit"; |
| 72 | if (node.expr()->id() == comp.loop_condition().id()) return "LoopCondition"; |
| 73 | if (node.expr()->id() == comp.loop_step().id()) return "LoopStep"; |
| 74 | if (node.expr()->id() == comp.result().id()) return "Result"; |
| 75 | } |
| 76 | |
| 77 | return absl::StrCat(NodeKindName(node.node_kind()), " Node"); |
| 78 | } |
| 79 | |
| 80 | const Type* absl_nullable FindCheckerType(const CheckedExpr& expr, |
| 81 | int64_t expr_id) { |
no test coverage detected