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

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

Issue 2731863002: move comment tokens into preceedingComments field (Closed)
Patch Set: merge 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 * 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
34 * comments can be reached by following the token stream using [next] until
35 * `null` is returned.
36 */
37 Token precedingComments;
38
39 /**
32 * The precedence info for this token. [info] determines the kind and the 40 * The precedence info for this token. [info] determines the kind and the
33 * precedence level of this token. 41 * precedence level of this token.
34 * 42 *
35 * Defined as getter to save a field in the [KeywordToken] subclass. 43 * Defined as getter to save a field in the [KeywordToken] subclass.
36 */ 44 */
37 PrecedenceInfo get info; 45 PrecedenceInfo get info;
38 46
39 /** 47 /**
40 * The string represented by this token, a substring of the source code. 48 * The string represented by this token, a substring of the source code.
41 * 49 *
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 identical(value, "<=") || 359 identical(value, "<=") ||
352 identical(value, "<") || 360 identical(value, "<") ||
353 identical(value, "&") || 361 identical(value, "&") ||
354 identical(value, "^") || 362 identical(value, "^") ||
355 identical(value, "|"); 363 identical(value, "|");
356 } 364 }
357 365
358 bool isTernaryOperator(String value) => identical(value, "[]="); 366 bool isTernaryOperator(String value) => identical(value, "[]=");
359 367
360 bool isMinusOperator(String value) => identical(value, "-"); 368 bool isMinusOperator(String value) => identical(value, "-");
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/string_scanner.dart ('k') | pkg/front_end/lib/src/fasta/scanner/utf8_bytes_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698