Ludwig Lehnert f8c17803c3 revamping...
2024-12-22 00:04:01 +01:00

23 lines
497 B
C++

#pragma once
#include "AST/Base.h"
#include <memory>
namespace plsm {
namespace ast {
class RetStmt : public Stmt {
const std::shared_ptr<Expr> value;
public:
RetStmt(LOC_ARG, Expr *value) : Stmt(sourceRange), value(value) {}
virtual boost::json::value toJson() override;
static RetStmt *fromJson(boost::json::value json);
virtual std::any accept(ASTVisitor *visitor, std::any param) override {
return visitor->visit(*this, param);
}
};
} // namespace ast
} // namespace plsm