UNPKG

@ayanaware/bentocord

Version:

Bentocord is a Bento plugin designed to rapidly build fully functional Discord Bots.

30 lines (29 loc) 616 B
export declare enum TokenType { WHITESPACE = 0, WORD = 1, QUOTE_OPEN = 2, QUOTE_CLOSE = 3, OPTION = 4, EOF = 5 } export interface Token { type: TokenType; value?: string; } export declare class Tokenizer { tokens: Array<Token>; private readonly content; private position; private quoteState; constructor(content: string); tokenize(): Array<Token>; private addToken; private shift; private addAndShiftToken; private match; private nextToken; private findWhitespace; private findOption; private findQuote; private findWord; }