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

@ -96,7 +96,7 @@ export default class ChefLanguageEngine implements LanguageEngine<T.ChefRS> {
const currFrame = this.getCurrentFrame();
if (currFrame.pc === currFrame.recipe.method.length) {
// Next step is "Serves" statement
nextStepLocation = { line: currFrame.recipe.serves!.line + 1 };
nextStepLocation = { startLine: currFrame.recipe.serves!.line };
} else {
// Next step is a regular method instruction
const nextOp = currFrame.recipe.method[currFrame.pc];