import {Command, ParseContext, StrTerm} from "./command.js"; import {LexInput} from "../lexer.js"; export type RSubData = { offset: StrTerm, length?: StrTerm, } export class RSub extends Command { attemptParse(context: ParseContext): RSubData { return { offset: context.popTerm(), length: context.popOptionalTerm(), } } getDisplayName(): string { return 'rsub' } isParseCandidate(token: LexInput): boolean { return this.isKeyword(token, 'rsub') } }