Files
str/src/vm/commands/quote.ts

19 lines
462 B
TypeScript
Raw Normal View History

2025-11-11 21:37:32 -06:00
import {Command, ParseContext, StrTerm} from "./command.js";
import {LexInput} from "../lexer.js";
export class Quote extends Command<{ with?: StrTerm }> {
attemptParse(context: ParseContext): { with?: StrTerm } {
return {
with: context.popOptionalTerm(),
}
}
getDisplayName(): string {
return 'quote'
}
isParseCandidate(token: LexInput): boolean {
return this.isKeyword(token, 'quote')
}
}