obelisk/src/ast/error.h

29 lines
653 B
C
Raw Normal View History

2022-11-21 21:24:44 -03:00
#ifndef OBELISK_AST_ERROR_H
#define OBELISK_AST_ERROR_H
#include "ast/expression_ast.h"
#include <memory>
namespace obelisk
{
2023-02-20 22:01:14 -03:00
/**
* @brief Log an AST expression error.
*
* @param[in] str The error message.
* @return std::unique_ptr<ExpressionAST> Returns the AST expression that
* caused the error.
2023-02-20 22:01:14 -03:00
*/
std::unique_ptr<ExpressionAST> LogError(const char *str);
/**
* @brief Log an AST value error.
*
* @param[in] str The error message.
* @return llvm::Value* Returns the AST value that caused the error.
*/
llvm::Value *LogErrorV(const char *str);
2022-11-21 21:24:44 -03:00
} // namespace obelisk
#endif