Skip to content

Commit

Permalink
fix: fixed dot operator not having proper error highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
alinalihassan committed Apr 22, 2023
1 parent 9a66738 commit 322847f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/liblesma/Backend/Codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void Codegen::WriteToObjectFile(const std::string &output) {
if (err) {
throw CodegenError({}, "Error opening file {} for writing: {}", output, err.message());
}

llvm::legacy::PassManager passManager;
if (TargetMachine->addPassesToEmitFile(passManager, out, nullptr, llvm::CGFT_ObjectFile))
throw CodegenError({}, "Target Machine can't emit an object file");
Expand Down
2 changes: 1 addition & 1 deletion src/liblesma/Frontend/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Expression *Parser::ParseDot() {
while (AdvanceIfMatchAny<TokenType::DOT>()) {
auto op = Previous();
auto expr = ParseTerm();
left = new DotOp({op->getStart(), expr->getEnd()}, left, op->type, expr);
left = new DotOp({left->getStart(), expr->getEnd()}, left, op->type, expr);
}

return left;
Expand Down

0 comments on commit 322847f

Please sign in to comment.