Now, It Should Build Fine.
This commit is contained in:
parent
3a51cb446f
commit
f5495d0138
@ -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
|
||||
}
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user