1 | import type { TextRange } from './TextRange';
|
2 | /**
|
3 | * Distinguishes different types of Token objects.
|
4 | */
|
5 | export declare enum TokenKind {
|
6 | /**
|
7 | * A token representing the end of the input. The Token.range will be an empty range
|
8 | * at the end of the provided input.
|
9 | */
|
10 | EndOfInput = 2001,
|
11 | /**
|
12 | * A token representing a virtual newline.
|
13 | * The Token.range will be an empty range, because the actual newline character may
|
14 | * be noncontiguous due to the doc comment delimiter trimming.
|
15 | */
|
16 | Newline = 2002,
|
17 | /**
|
18 | * A token representing one or more spaces and tabs (but not newlines or end of input).
|
19 | */
|
20 | Spacing = 2003,
|
21 | /**
|
22 | * A token representing one or more ASCII letters, numbers, and underscores.
|
23 | */
|
24 | AsciiWord = 2004,
|
25 | /**
|
26 | * A single ASCII character that behaves like punctuation, e.g. doesn't need whitespace
|
27 | * around it when adjacent to a letter. The Token.range will always be a string of length 1.
|
28 | */
|
29 | OtherPunctuation = 2005,
|
30 | /**
|
31 | * A token representing a sequence of non-ASCII printable characters that are not punctuation.
|
32 | */
|
33 | Other = 2006,
|
34 | /**
|
35 | * The backslash character `\`.
|
36 | * The Token.range will always be a string of length 1.
|
37 | */
|
38 | Backslash = 2007,
|
39 | /**
|
40 | * The less-than character `<`.
|
41 | * The Token.range will always be a string of length 1.
|
42 | */
|
43 | LessThan = 2008,
|
44 | /**
|
45 | * The greater-than character `>`.
|
46 | * The Token.range will always be a string of length 1.
|
47 | */
|
48 | GreaterThan = 2009,
|
49 | /**
|
50 | * The equals character `=`.
|
51 | * The Token.range will always be a string of length 1.
|
52 | */
|
53 | Equals = 2010,
|
54 | /**
|
55 | * The single-quote character `'`.
|
56 | * The Token.range will always be a string of length 1.
|
57 | */
|
58 | SingleQuote = 2011,
|
59 | /**
|
60 | * The double-quote character `"`.
|
61 | * The Token.range will always be a string of length 1.
|
62 | */
|
63 | DoubleQuote = 2012,
|
64 | /**
|
65 | * The slash character `/`.
|
66 | * The Token.range will always be a string of length 1.
|
67 | */
|
68 | Slash = 2013,
|
69 | /**
|
70 | * The hyphen character `-`.
|
71 | * The Token.range will always be a string of length 1.
|
72 | */
|
73 | Hyphen = 2014,
|
74 | /**
|
75 | * The at-sign character `@`.
|
76 | * The Token.range will always be a string of length 1.
|
77 | */
|
78 | AtSign = 2015,
|
79 | /**
|
80 | * The left curly bracket character `{`.
|
81 | * The Token.range will always be a string of length 1.
|
82 | */
|
83 | LeftCurlyBracket = 2016,
|
84 | /**
|
85 | * The right curly bracket character `}`.
|
86 | * The Token.range will always be a string of length 1.
|
87 | */
|
88 | RightCurlyBracket = 2017,
|
89 | /**
|
90 | * The backtick character.
|
91 | * The Token.range will always be a string of length 1.
|
92 | */
|
93 | Backtick = 2018,
|
94 | /**
|
95 | * The period character.
|
96 | * The Token.range will always be a string of length 1.
|
97 | */
|
98 | Period = 2019,
|
99 | /**
|
100 | * The colon character.
|
101 | * The Token.range will always be a string of length 1.
|
102 | */
|
103 | Colon = 2020,
|
104 | /**
|
105 | * The comma character.
|
106 | * The Token.range will always be a string of length 1.
|
107 | */
|
108 | Comma = 2021,
|
109 | /**
|
110 | * The left square bracket character.
|
111 | * The Token.range will always be a string of length 1.
|
112 | */
|
113 | LeftSquareBracket = 2022,
|
114 | /**
|
115 | * The right square bracket character.
|
116 | * The Token.range will always be a string of length 1.
|
117 | */
|
118 | RightSquareBracket = 2023,
|
119 | /**
|
120 | * The pipe character `|`.
|
121 | * The Token.range will always be a string of length 1.
|
122 | */
|
123 | Pipe = 2024,
|
124 | /**
|
125 | * The left parenthesis character.
|
126 | * The Token.range will always be a string of length 1.
|
127 | */
|
128 | LeftParenthesis = 2025,
|
129 | /**
|
130 | * The right parenthesis character.
|
131 | * The Token.range will always be a string of length 1.
|
132 | */
|
133 | RightParenthesis = 2026,
|
134 | /**
|
135 | * The pound character ("#").
|
136 | * The Token.range will always be a string of length 1.
|
137 | */
|
138 | PoundSymbol = 2027,
|
139 | /**
|
140 | * The plus character ("+").
|
141 | * The Token.range will always be a string of length 1.
|
142 | */
|
143 | Plus = 2028,
|
144 | /**
|
145 | * The dollar sign character ("$").
|
146 | * The Token.range will always be a string of length 1.
|
147 | */
|
148 | DollarSign = 2029
|
149 | }
|
150 | /**
|
151 | * Represents a contiguous range of characters extracted from one of the doc comment lines
|
152 | * being processed by the Tokenizer. There is a token representing a newline, but otherwise
|
153 | * a single token cannot span multiple lines.
|
154 | */
|
155 | export declare class Token {
|
156 | /**
|
157 | * The kind of token
|
158 | */
|
159 | readonly kind: TokenKind;
|
160 | /**
|
161 | * The contiguous input range corresponding to the token. This range will never
|
162 | * contain a newline character.
|
163 | */
|
164 | readonly range: TextRange;
|
165 | /**
|
166 | * The doc comment "line" that this Token was extracted from.
|
167 | */
|
168 | readonly line: TextRange;
|
169 | constructor(kind: TokenKind, range: TextRange, line: TextRange);
|
170 | toString(): string;
|
171 | }
|
172 | //# sourceMappingURL=Token.d.ts.map |
\ | No newline at end of file |