| 152 | }; |
| 153 | |
| 154 | class function_ref_expr |
| 155 | { |
| 156 | public: |
| 157 | function_ref_expr(std::string name, std::vector<expr> args); |
| 158 | function_ref_expr(std::string name, std::vector<std::pair<expr, expr>> arg_pairs); |
| 159 | |
| 160 | const std::string& get_name() const |
| 161 | { |
| 162 | return name; |
| 163 | } |
| 164 | |
| 165 | bool has_arg_pairs() const; |
| 166 | |
| 167 | const std::vector<expr>& get_args() const; |
| 168 | |
| 169 | const std::vector<std::pair<expr, expr>>& get_arg_pairs() const; |
| 170 | |
| 171 | std::string to_string() const; |
| 172 | |
| 173 | private: |
| 174 | using data_t = std::variant<std::vector<expr>, std::vector<std::pair<expr, expr>>>; |
| 175 | std::string name; |
| 176 | std::shared_ptr<data_t> args; |
| 177 | }; |
| 178 | |
| 179 | class unary_operator_expr |
| 180 | { |