str/src/vm/commands/lipsum.ts

19 lines
459 B
TypeScript
Raw Normal View History

2025-11-12 02:50:28 +00:00
import {Command, ParseContext, StrTerm} from './command.js'
import {LexInput} from '../lexer.js'
export class Lipsum extends Command<{ length: StrTerm }> {
attemptParse(context: ParseContext): { length: StrTerm } {
return {
length: context.popTerm(),
}
}
getDisplayName(): string {
return 'lipsum'
}
isParseCandidate(token: LexInput): boolean {
return this.isKeyword(token, 'lipsum')
}
}