Add with_col_offset and with_row_offset to Location

This commit is contained in:
harupy 2023-01-04 13:16:03 +09:00
parent b6647b0171
commit 72185fecd5
4 changed files with 44 additions and 8 deletions

View file

@ -168,7 +168,7 @@ impl SymbolTableError {
pub fn into_codegen_error(self, source_path: String) -> CodegenError {
CodegenError {
error: CodegenErrorType::SyntaxError(self.error),
location: Location::new(self.location.row(), self.location.column() + 1),
location: self.location.with_col_offset(1),
source_path,
}
}