Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | export declare enum TokenType {
|
---|
9 | Character = 0,
|
---|
10 | Identifier = 1,
|
---|
11 | PrivateIdentifier = 2,
|
---|
12 | Keyword = 3,
|
---|
13 | String = 4,
|
---|
14 | Operator = 5,
|
---|
15 | Number = 6,
|
---|
16 | Error = 7
|
---|
17 | }
|
---|
18 | export declare class Lexer {
|
---|
19 | tokenize(text: string): Token[];
|
---|
20 | }
|
---|
21 | export declare class Token {
|
---|
22 | index: number;
|
---|
23 | end: number;
|
---|
24 | type: TokenType;
|
---|
25 | numValue: number;
|
---|
26 | strValue: string;
|
---|
27 | constructor(index: number, end: number, type: TokenType, numValue: number, strValue: string);
|
---|
28 | isCharacter(code: number): boolean;
|
---|
29 | isNumber(): boolean;
|
---|
30 | isString(): boolean;
|
---|
31 | isOperator(operator: string): boolean;
|
---|
32 | isIdentifier(): boolean;
|
---|
33 | isPrivateIdentifier(): boolean;
|
---|
34 | isKeyword(): boolean;
|
---|
35 | isKeywordLet(): boolean;
|
---|
36 | isKeywordAs(): boolean;
|
---|
37 | isKeywordNull(): boolean;
|
---|
38 | isKeywordUndefined(): boolean;
|
---|
39 | isKeywordTrue(): boolean;
|
---|
40 | isKeywordFalse(): boolean;
|
---|
41 | isKeywordThis(): boolean;
|
---|
42 | isError(): boolean;
|
---|
43 | toNumber(): number;
|
---|
44 | toString(): string | null;
|
---|
45 | }
|
---|
46 | export declare const EOF: Token;
|
---|
47 | export declare function isIdentifier(input: string): boolean;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.