Replace StringRange w/ an actual StrRVal + more command implementations
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {Command, ParseContext} from "./command.js";
|
||||
import {Command, ParseContext, wrapString} from "./command.js";
|
||||
import {LexInput} from "../lexer.js";
|
||||
import {StrVM} from "../vm.js";
|
||||
import {Awaitable} from "../../util/types.js";
|
||||
@@ -17,8 +17,6 @@ export class Clear extends Command<{}> {
|
||||
}
|
||||
|
||||
execute(vm: StrVM): Awaitable<StrVM> {
|
||||
return vm.inPlace(ctx =>
|
||||
ctx.replaceSubject(sub =>
|
||||
sub.replaceWith('')))
|
||||
return vm.tapInPlace(ctx => ctx.replaceSubjectAsString(''))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user