Added builder error

This commit is contained in:
Rafał Grodziński
2025-07-05 21:58:11 +09:00
parent 1e7ecaf801
commit 48f27169d0
6 changed files with 38 additions and 10 deletions

View File

@@ -11,6 +11,7 @@
#include <llvm/Support/raw_ostream.h>
#include <llvm/IR/Verifier.h>
class Error;
class ValueType;
class Expression;
@@ -41,6 +42,7 @@ typedef struct {
class ModuleBuilder {
private:
vector<shared_ptr<Error>> errors;
string moduleName;
string sourceFileName;
@@ -86,6 +88,8 @@ private:
llvm::Type *typeForValueType(shared_ptr<ValueType> valueType);
void failWithMessage(string message);
void markError(int line, int column, string message);
public:
ModuleBuilder(string moduleName, string sourceFileName, vector<shared_ptr<Statement>> statements);
shared_ptr<llvm::Module> getModule();