Skip to content

Commit

Permalink
fix line numbers when compiling with -al
Browse files Browse the repository at this point in the history
  • Loading branch information
yeti0904 committed Jul 24, 2024
1 parent 2b47ad3 commit 2f68738
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/compiler.d
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ class Compiler {
backend.output ~= "; " ~ inode.toString().replace("\n", "\n; ") ~ '\n';
size_t line = backend.output.count!((ch) => ch == '\n');
writefln(
"%s:%d:%d - line %d, node %s", inode.error.file, inode.error.line, inode.error.col,
line, inode.type
"%s:%d:%d - line %d, node %s", inode.error.file, inode.error.line + 1,
inode.error.col + 1, line, inode.type
);
}
}
Expand Down

0 comments on commit 2f68738

Please sign in to comment.