import {Command, CommandData, ParseContext, StrLVal} from "./command.js"; import {Executable} from "../parse.js"; import {LexInput} from "../lexer.js"; export type OverData = { subject: StrLVal, exec: Executable, } export class Over extends Command { async attemptParse(context: ParseContext): Promise { return { subject: context.popLVal(), exec: await context.popExecutable(), } } getDisplayName(): string { return 'over' } isParseCandidate(token: LexInput): boolean { return this.isKeyword(token, 'over') } }