Skip to content

Commit

Permalink
fix: Updated enums not being added as symbol table entries
Browse files Browse the repository at this point in the history
  • Loading branch information
alinalihassan committed May 13, 2022
1 parent 21ec5a1 commit 833ca38
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/liblesma/Backend/Codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,10 @@ void Codegen::visit(Enum *node) {
llvm::StructType *structType = llvm::StructType::create(*TheContext, elementTypes, node->getIdentifier());

auto *type = new SymbolType(TY_STRUCT);
auto *structSymbol = new SymbolTableEntry(node->getIdentifier(), *type);
structSymbol->setLLVMType(structType);
Scope->insertType(node->getIdentifier(), type);
// TODO: Add to scope table (currently only symbols, not types), implement "." dot access operator,
Scope->insertSymbol(structSymbol);
}

llvm::Value *Codegen::visit(FuncCall *node) {
Expand Down

0 comments on commit 833ca38

Please sign in to comment.