OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library fasta.scanner.token; | 5 library fasta.scanner.token; |
6 | 6 |
7 import 'keyword.dart' show Keyword; | 7 import 'keyword.dart' show Keyword; |
8 | 8 |
9 import 'precedence.dart' show BAD_INPUT_INFO, EOF_INFO, PrecedenceInfo; | 9 import 'precedence.dart' show BAD_INPUT_INFO, EOF_INFO, PrecedenceInfo; |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 final int charOffset; | 22 final int charOffset; |
23 | 23 |
24 Token(this.charOffset); | 24 Token(this.charOffset); |
25 | 25 |
26 /** | 26 /** |
27 * The next token in the token stream. | 27 * The next token in the token stream. |
28 */ | 28 */ |
29 Token next; | 29 Token next; |
30 | 30 |
31 /** | 31 /** |
| 32 * The previous token in the token stream. |
| 33 * |
| 34 * Deprecated :: This exists for compatibility with the Analyzer token stream |
| 35 * and will be removed at some future date. |
| 36 */ |
| 37 @deprecated |
| 38 Token previousToken; |
| 39 |
| 40 /** |
32 * Return the first comment in the list of comments that precede this token, | 41 * Return the first comment in the list of comments that precede this token, |
33 * or `null` if there are no comments preceding this token. Additional | 42 * or `null` if there are no comments preceding this token. Additional |
34 * comments can be reached by following the token stream using [next] until | 43 * comments can be reached by following the token stream using [next] until |
35 * `null` is returned. | 44 * `null` is returned. |
36 */ | 45 */ |
37 Token precedingComments; | 46 Token precedingComments; |
38 | 47 |
39 /** | 48 /** |
40 * The precedence info for this token. [info] determines the kind and the | 49 * The precedence info for this token. [info] determines the kind and the |
41 * precedence level of this token. | 50 * precedence level of this token. |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 identical(value, "<=") || | 368 identical(value, "<=") || |
360 identical(value, "<") || | 369 identical(value, "<") || |
361 identical(value, "&") || | 370 identical(value, "&") || |
362 identical(value, "^") || | 371 identical(value, "^") || |
363 identical(value, "|"); | 372 identical(value, "|"); |
364 } | 373 } |
365 | 374 |
366 bool isTernaryOperator(String value) => identical(value, "[]="); | 375 bool isTernaryOperator(String value) => identical(value, "[]="); |
367 | 376 |
368 bool isMinusOperator(String value) => identical(value, "-"); | 377 bool isMinusOperator(String value) => identical(value, "-"); |
OLD | NEW |