Replace StringRange w/ an actual StrRVal + more command implementations

This commit is contained in:
2026-02-09 22:15:33 -06:00
parent 82eda43dad
commit feba84051a
29 changed files with 502 additions and 192 deletions

View File

@@ -19,8 +19,7 @@ export class Suffix extends Command<{ with: StrTerm }> {
}
execute(vm: StrVM, data: { with: StrTerm }): Awaitable<StrVM> {
return vm.inPlace(ctx =>
ctx.replaceSubject(sub =>
sub.modify(s => `${s}${ctx.resolveString(data.with)}`)))
return vm.tapInPlace(ctx =>
ctx.replaceSubjectAsString(sub => `${sub}${ctx.resolveString(data.with)}`))
}
}