UNPKG

@rightcapital/phpdoc-parser

Version:

TypeScript version of PHPDoc parser with support for intersection types and generics

81 lines (80 loc) 3.11 kB
export declare class Lexer { static TOKEN_REFERENCE: string; static TOKEN_UNION: string; static TOKEN_INTERSECTION: string; static TOKEN_NULLABLE: string; static TOKEN_OPEN_PARENTHESES: string; static TOKEN_CLOSE_PARENTHESES: string; static TOKEN_OPEN_ANGLE_BRACKET: string; static TOKEN_CLOSE_ANGLE_BRACKET: string; static TOKEN_OPEN_SQUARE_BRACKET: string; static TOKEN_CLOSE_SQUARE_BRACKET: string; static TOKEN_COMMA: string; static TOKEN_VARIADIC: string; static TOKEN_DOUBLE_COLON: string; static TOKEN_DOUBLE_ARROW: string; static TOKEN_EQUAL: string; static TOKEN_OPEN_PHPDOC: string; static TOKEN_CLOSE_PHPDOC: string; static TOKEN_PHPDOC_TAG: string; static TOKEN_FLOAT: string; static TOKEN_INTEGER: string; static TOKEN_SINGLE_QUOTED_STRING: string; static TOKEN_DOUBLE_QUOTED_STRING: string; static TOKEN_IDENTIFIER: string; static TOKEN_THIS_VARIABLE: string; static TOKEN_VARIABLE: string; static TOKEN_HORIZONTAL_WS: string; static TOKEN_PHPDOC_EOL: string; static TOKEN_OTHER: string; static TOKEN_END: string; static TOKEN_COLON: string; static TOKEN_WILDCARD: string; static TOKEN_OPEN_CURLY_BRACKET: string; static TOKEN_CLOSE_CURLY_BRACKET: string; static TOKEN_NEGATED: string; static TOKEN_ARROW: string; static TOKEN_LABELS: { [Lexer.TOKEN_REFERENCE]: string; [Lexer.TOKEN_UNION]: string; [Lexer.TOKEN_INTERSECTION]: string; [Lexer.TOKEN_NULLABLE]: string; [Lexer.TOKEN_NEGATED]: string; [Lexer.TOKEN_OPEN_PARENTHESES]: string; [Lexer.TOKEN_CLOSE_PARENTHESES]: string; [Lexer.TOKEN_OPEN_ANGLE_BRACKET]: string; [Lexer.TOKEN_CLOSE_ANGLE_BRACKET]: string; [Lexer.TOKEN_OPEN_SQUARE_BRACKET]: string; [Lexer.TOKEN_CLOSE_SQUARE_BRACKET]: string; [Lexer.TOKEN_OPEN_CURLY_BRACKET]: string; [Lexer.TOKEN_CLOSE_CURLY_BRACKET]: string; [Lexer.TOKEN_COMMA]: string; [Lexer.TOKEN_COLON]: string; [Lexer.TOKEN_VARIADIC]: string; [Lexer.TOKEN_DOUBLE_COLON]: string; [Lexer.TOKEN_DOUBLE_ARROW]: string; [Lexer.TOKEN_ARROW]: string; [Lexer.TOKEN_EQUAL]: string; [Lexer.TOKEN_OPEN_PHPDOC]: string; [Lexer.TOKEN_CLOSE_PHPDOC]: string; [Lexer.TOKEN_PHPDOC_TAG]: string; [Lexer.TOKEN_PHPDOC_EOL]: string; [Lexer.TOKEN_FLOAT]: string; [Lexer.TOKEN_INTEGER]: string; [Lexer.TOKEN_SINGLE_QUOTED_STRING]: string; [Lexer.TOKEN_DOUBLE_QUOTED_STRING]: string; [Lexer.TOKEN_IDENTIFIER]: string; [Lexer.TOKEN_THIS_VARIABLE]: string; [Lexer.TOKEN_VARIABLE]: string; [Lexer.TOKEN_HORIZONTAL_WS]: string; [Lexer.TOKEN_OTHER]: string; [Lexer.TOKEN_END]: string; [Lexer.TOKEN_WILDCARD]: string; }; static VALUE_OFFSET: 0; static TYPE_OFFSET: 1; static LINE_OFFSET: 2; private regexp; tokenize(source: string): Array<[string, string, number]>; private generateRegexp; }