X-Git-Url: https://gitweb.ps.run/toc/blobdiff_plain/45409c781a9e35df68c43b1e2f028d30bf90c0a0..b64d16088b29615d222d33450cf0315467400e59:/src/repr.h diff --git a/src/repr.h b/src/repr.h index ce176ef..6737ef4 100644 --- a/src/repr.h +++ b/src/repr.h @@ -43,6 +43,7 @@ struct Body { }; struct Function { + Type returnType; std::string name; std::vector parameters; Body body; @@ -65,7 +66,7 @@ enum class ExprType { }; struct CallExpr { - Function function; + std::string functionName; std::vector arguments; }; @@ -78,11 +79,8 @@ struct VariableExpr { }; struct BracketsExpr { - BracketsExpr() {} - BracketsExpr(const BracketsExpr &) {} - BracketsExpr & operator=(const BracketsExpr &) {return *this;}; - std::unique_ptr lexpr; - std::unique_ptr rexpr; + std::shared_ptr lexpr; + std::shared_ptr rexpr; }; enum class OperatorType { @@ -92,19 +90,13 @@ enum class OperatorType { }; struct OperatorExpr { - OperatorExpr() {} - OperatorExpr(const OperatorExpr &) {} - OperatorExpr & operator=(const OperatorExpr &) {return *this;}; - std::unique_ptr lexpr; - std::unique_ptr rexpr; + std::shared_ptr lexpr; + std::shared_ptr rexpr; OperatorType type; }; struct DotExpr { - DotExpr() {} - DotExpr(const DotExpr &) {} - DotExpr & operator=(const DotExpr &) {return *this;}; - std::unique_ptr lexpr; + std::shared_ptr lexpr; std::string name; };