str/src/vm/commands/missing.ts

19 lines
460 B
TypeScript

import { LexInput } from "../lexer.js";
import {Command, ParseContext, StrTerm} from "./command.js";
export class Missing extends Command<{ find: StrTerm }> {
attemptParse(context: ParseContext): { find: StrTerm } {
return {
find: context.popTerm(),
}
}
getDisplayName(): string {
return 'missing'
}
isParseCandidate(token: LexInput): boolean {
return this.isKeyword(token, 'missing')
}
}