import {Command, ParseContext, StrTerm} from './command.js' import {LexInput} from '../lexer.js' export type LipsumData = { length: StrTerm, type: 'word'|'line'|'para' } export class Lipsum extends Command { attemptParse(context: ParseContext): LipsumData { return { length: context.popTerm(), type: context.popKeywordInSet(['word', 'line', 'para']).value, } } getDisplayName(): string { return 'lipsum' } isParseCandidate(token: LexInput): boolean { return this.isKeyword(token, 'lipsum') } }