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

@ -57,7 +57,7 @@ export default class DeadfishLanguageEngine implements LanguageEngine<DFRS> {
if (OP_CHARS.includes(char as DF_OP)) {
ast.push({
instr: char as DF_OP,
location: { line: lIdx + 1, char: cIdx + 1 },
location: { line: lIdx, char: cIdx },
});
}
});