| 1352 | : source_info_(source_info) {} |
| 1353 | |
| 1354 | std::string Adorn(const cel::Expr& e) const override { |
| 1355 | // source_info_ might be empty on non-macro_calls tests |
| 1356 | if (source_info_.macro_calls_size() != 0 && |
| 1357 | source_info_.macro_calls().contains(e.id())) { |
| 1358 | return absl::StrFormat( |
| 1359 | "^#%d:%s#", e.id(), |
| 1360 | source_info_.macro_calls().at(e.id()).call_expr().function()); |
| 1361 | } |
| 1362 | |
| 1363 | if (e.has_const_expr()) { |
| 1364 | auto& const_expr = e.const_expr(); |
| 1365 | return absl::StrCat("^#", e.id(), ":", ConstantKind(const_expr), "#"); |
| 1366 | } else { |
| 1367 | return absl::StrCat("^#", e.id(), ":", ExprKind(e), "#"); |
| 1368 | } |
| 1369 | } |
| 1370 | |
| 1371 | std::string AdornStructField(const cel::StructExprField& e) const override { |
| 1372 | return absl::StrFormat("^#%d:Expr.CreateStruct.Entry#", e.id()); |
nothing calls this directly
no test coverage detected