Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Side by Side Diff: pkg/front_end/lib/src/fasta/scanner/token.dart

Issue 2739583002: add previous token field (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 * @deprecated This exists for compatibility with the Analyzer token stream
Paul Berry 2017/03/07 13:47:28 Saying "@deprecated" here doesn't have any effect
danrubel 2017/03/07 14:40:54 Good catch. That's what I meant to do. Fixed.
34 * and will be removed at some future date.
35 */
36 Token previous;
37
38 /**
32 * Return the first comment in the list of comments that precede this token, 39 * 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 40 * or `null` if there are no comments preceding this token. Additional
34 * comments can be reached by following the token stream using [next] until 41 * comments can be reached by following the token stream using [next] until
35 * `null` is returned. 42 * `null` is returned.
36 */ 43 */
37 Token precedingComments; 44 Token precedingComments;
38 45
39 /** 46 /**
40 * The precedence info for this token. [info] determines the kind and the 47 * The precedence info for this token. [info] determines the kind and the
41 * precedence level of this token. 48 * precedence level of this token.
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 identical(value, "<=") || 366 identical(value, "<=") ||
360 identical(value, "<") || 367 identical(value, "<") ||
361 identical(value, "&") || 368 identical(value, "&") ||
362 identical(value, "^") || 369 identical(value, "^") ||
363 identical(value, "|"); 370 identical(value, "|");
364 } 371 }
365 372
366 bool isTernaryOperator(String value) => identical(value, "[]="); 373 bool isTernaryOperator(String value) => identical(value, "[]=");
367 374
368 bool isMinusOperator(String value) => identical(value, "-"); 375 bool isMinusOperator(String value) => identical(value, "-");
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart ('k') | pkg/front_end/test/scanner_fasta_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698