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

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

Issue 2757113002: fasta.Token implement analyzer.Token (Closed)
Patch Set: rebase 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /** 5 /**
6 * Defines the tokens that are produced by the scanner, used by the parser, and 6 * Defines the tokens that are produced by the scanner, used by the parser, and
7 * referenced from the [AST structure](ast.dart). 7 * referenced from the [AST structure](ast.dart).
8 */ 8 */
9 import 'dart:collection'; 9 import 'dart:collection';
10 10
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
685 * Return the type of the token. 685 * Return the type of the token.
686 */ 686 */
687 TokenType get type; 687 TokenType get type;
688 688
689 /** 689 /**
690 * Apply (add) the given [delta] to this token's offset. 690 * Apply (add) the given [delta] to this token's offset.
691 */ 691 */
692 void applyDelta(int delta); 692 void applyDelta(int delta);
693 693
694 /** 694 /**
695 * Return a newly created token that is a copy of this token but that is not a 695 * Return a newly created token that is a copy of this tokens
696 * part of any token stream. 696 * including any [preceedingComment] tokens,
697 * but that is not a part of any token stream.
697 */ 698 */
698 Token copy(); 699 Token copy();
699 700
700 /** 701 /**
701 * Copy a linked list of comment tokens identical to the given comment tokens. 702 * Copy a linked list of comment tokens identical to the given comment tokens.
702 */ 703 */
703 Token copyComments(Token token); 704 Token copyComments(Token token);
704 705
705 /** 706 /**
706 * Return `true` if this token has any one of the given [types]. 707 * Return `true` if this token has any one of the given [types].
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 1158
1158 void set precedingComments(CommentToken comment) { 1159 void set precedingComments(CommentToken comment) {
1159 _precedingComment = comment; 1160 _precedingComment = comment;
1160 _setCommentParent(_precedingComment); 1161 _setCommentParent(_precedingComment);
1161 } 1162 }
1162 1163
1163 @override 1164 @override
1164 Token copy() => 1165 Token copy() =>
1165 new TokenWithComment(type, offset, copyComments(precedingComments)); 1166 new TokenWithComment(type, offset, copyComments(precedingComments));
1166 } 1167 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/token.dart ('k') | pkg/front_end/test/precedence_info_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698