Refactor so engines use 0-based document ranges

This commit is contained in:
Nilay Majorwar
2022-01-20 15:29:21 +05:30
parent dbfacece2c
commit d8481c097b
5 changed files with 28 additions and 21 deletions

View File

@ -85,7 +85,7 @@ export default class BrainfuckLanguageEngine implements LanguageEngine<BFRS> {
// Add instruction to AST
ast.push({
instr: { type: char as BF_OP, param: jumpTarget },
location: { line: lIdx + 1, char: cIdx + 1 },
location: { line: lIdx, char: cIdx },
});
});
});