Now, It Should Build Fine.

This commit is contained in:
apio 2022-06-08 17:49:22 +02:00
parent 3a51cb446f
commit f5495d0138
2 changed files with 6 additions and 1 deletions

View File

@ -26,3 +26,8 @@ std::shared_ptr<ASTNode> Parser::parse()
return result.get();
}
Parser::ErrorOr<ExprNode> Parser::walk_expr()
{
return ErrorOr<ExprNode>(new ExprNode()); // constructor does not want to accept a shared_ptr<T> in the argument list, thats why im not using make_shared here
}

View File

@ -21,7 +21,7 @@ class Parser
return error_tok;
}
ErrorOr(std::shared_ptr<T>& ptr) : m_ptr(ptr), m_is_error(false) {}
ErrorOr(T* ptr) : m_ptr(ptr), m_is_error(false) {}
ErrorOr(const std::string& error, const Token& error_tok) : m_error(error), m_is_error(true), error_tok(error_tok) {}
bool is_error() { return m_is_error; }