#pragma once #include "AST/Base.h" #include #include #include #include namespace plsm { namespace ast { class BinExpr : public Expr { const std::string op; const std::unique_ptr left, right; public: BinExpr(LOC_ARG, std::unique_ptr &left, const std::string &op, std::unique_ptr &right) : Expr(location), left(std::move(left)), op(op), right(std::move(right)) { } virtual boost::json::value toJson() override; static std::unique_ptr fromJson(boost::json::value json); }; class PrefExpr : public Expr { const std::unique_ptr expr; public: PrefExpr(LOC_ARG, std::unique_ptr &expr) : Expr(location), expr(std::move(expr)) {} virtual boost::json::value toJson() override; static std::unique_ptr fromJson(boost::json::value json); }; } // namespace ast } // namespace plsm