Refactor DocumentRange to allow multiline ranges

This commit is contained in:
Nilay Majorwar
2022-02-16 21:20:44 +05:30
parent 0a3bac3517
commit a05731e91d
9 changed files with 120 additions and 92 deletions

View File

@ -42,8 +42,7 @@ export default class DeadfishLanguageEngine implements LanguageEngine<DFRS> {
let nextStepLocation: DocumentRange | null = null;
if (this._pc < this._ast.length) {
const { line, char } = this._ast[this._pc].location;
const charRange = { start: char, end: char + 1 };
nextStepLocation = { line, charRange };
nextStepLocation = { startLine: line, startCol: char, endCol: char + 1 };
}
// Prepare and return execution result