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

Class StackRecord

eval/public/ast_traverse.cc:72–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70 absl::variant<ExprRecord, ArgRecord, ComprehensionRecord>;
71
72struct StackRecord {
73 public:
74 ABSL_ATTRIBUTE_UNUSED static constexpr int kNotCallArg = -1;
75 static constexpr int kTarget = -2;
76
77 StackRecord(const Expr* e, const SourceInfo* info) {
78 ExprRecord record;
79 record.expr = e;
80 record.source_info = info;
81 record_variant = record;
82 }
83
84 StackRecord(const Expr* e, const SourceInfo* info,
85 const Comprehension* comprehension,
86 const Expr* comprehension_expr,
87 ComprehensionArg comprehension_arg,
88 bool use_comprehension_callbacks) {
89 if (use_comprehension_callbacks) {
90 ComprehensionRecord record;
91 record.expr = e;
92 record.source_info = info;
93 record.comprehension = comprehension;
94 record.comprehension_expr = comprehension_expr;
95 record.comprehension_arg = comprehension_arg;
96 record.use_comprehension_callbacks = use_comprehension_callbacks;
97 record_variant = record;
98 return;
99 }
100 ArgRecord record;
101 record.expr = e;
102 record.source_info = info;
103 record.calling_expr = comprehension_expr;
104 record.call_arg = comprehension_arg;
105 record_variant = record;
106 }
107
108 StackRecord(const Expr* e, const SourceInfo* info, const Expr* call,
109 int argnum) {
110 ArgRecord record;
111 record.expr = e;
112 record.source_info = info;
113 record.calling_expr = call;
114 record.call_arg = argnum;
115 record_variant = record;
116 }
117 StackRecordKind record_variant;
118 bool visited = false;
119};
120
121struct PreVisitor {
122 void operator()(const ExprRecord& record) {

Callers 6

PushSelectDepsFunction · 0.70
PushCallDepsFunction · 0.70
PushListDepsFunction · 0.70
PushStructDepsFunction · 0.70
operator()Method · 0.70
AstTraverseFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected