message: Define Lexer class
diff: @@ -246,7 +246,82 @@ declare module 'pug-lexer' {
  interpolated?: boolean;
  startingLine?: number;
  startingColumn?: number;
  - plugins?: Array<LexerFunction>;
  + plugins?: LexerFunction[];
  + }
  + export class Lexer {
  + input: string;
  + originalInput: string;
  + filename?: string;
  + interpolated: boolean;
  + lineno: number;
  + colno: number;
  + plugins: LexerFunction[];
  + indentStack: number[];
  + indentRe: RegExp | null;
  + interpolationAllowed: boolean;
  + whitespaceRe: RegExp;
  + tokens: Token[];
  + ended: boolean;
  + constructor(str: string, options?: LexerOptions);
  + error(code: string, message: string): never;
  + assert(value: any, message: string): void;
  + isExpression(exp: string): boolean;
  + assertExpression(exp: string, noThrow?: boolean): boolean;
  + assertNestingCorrect(exp: string): void;
  + private tok<Type extends LexTokenType>(type: Type, val?: any): LexToken<Type>;
  + private tokEnd<Type extends LexTokenType>(tok: LexToken<Type>): LexToken<Type>;
  + private incrementLine(increment: number): void;
  + private incrementColumn(increment: number): void;
  + private consume(len: number): void;
  + private scan<Type extends LexTokenType>(regexp: RegExp, type: Type): LexToken<Type> | undefined;
  + private scanEndOfLine<Type extends LexTokenType>(regexp: RegExp, type: Type): LexToken<Type> | undefined;
  + private bracketExpression(skip?: number): number;
  + scanIndentation(): RegExpExecArray | null;
  + eos(): true | undefined;
  + blank(): true | undefined;
  + comment(): true | undefined;
  + interpolation(): true | undefined;
  + tag(): true | undefined;
  + filter(): true | undefined;
  + doctype(): true | undefined;
  + id(): true | undefined;
  + className(): true | undefined;
  + endInterpolation(): true | undefined;
  + addText(type: LexTokenType, value: string, prefix?: string, escaped?: number): void;
  + text(): true | undefined;
  + textHtml(): true | undefined;
  + dot(): true | undefined;
  + extends(): true | undefined;
  + prepend(): true | undefined;
  + append(): true | undefined;
  + block(): true | undefined;
  + mixinBlock(): true | undefined;
  + yield(): true | undefined;
  + include(): true | undefined;
  + path(): true | undefined;
  + case(): true | undefined;
  + when(): true | undefined;
  + default(): true | undefined;
  + call(): true | undefined;
  + mixin(): true | undefined;
  + conditional(): true | undefined;
  + while(): true | undefined;
  + each(): true | undefined;
  + eachOf(): true | undefined;
  + code(): true | undefined;
  + blockCode(): true | undefined;
  + attribute(): string;
  + attributeValue(str: string): { val?: string; mustEscape?: boolean; remainingSource: string };
  + attrs(): true | undefined;
  + attributesBlock(): true | undefined;
  + indent(): true | NewlineToken | undefined;
  + pipelessText(indents?: number): boolean | undefined;
  + slash(): true | undefined;
  + colon(): true | undefined;
  + fail(): never;
  + callLexerFunction(func: string): boolean;
  + private advance(): boolean;
  + getTokens(): Token[];
  }
  }
  function lex(str: string, options?: lex.LexerOptions): lex.Token[];
  