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

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

Issue 2757153002: update fasta scanner to generate two types of comments (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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 static const TokenType DOUBLE = fasta.DOUBLE_INFO; 892 static const TokenType DOUBLE = fasta.DOUBLE_INFO;
893 893
894 static const TokenType HEXADECIMAL = fasta.HEXADECIMAL_INFO; 894 static const TokenType HEXADECIMAL = fasta.HEXADECIMAL_INFO;
895 895
896 static const TokenType IDENTIFIER = fasta.IDENTIFIER_INFO; 896 static const TokenType IDENTIFIER = fasta.IDENTIFIER_INFO;
897 897
898 static const TokenType INT = fasta.INT_INFO; 898 static const TokenType INT = fasta.INT_INFO;
899 899
900 static const TokenType KEYWORD = fasta.KEYWORD_INFO; 900 static const TokenType KEYWORD = fasta.KEYWORD_INFO;
901 901
902 static const TokenType MULTI_LINE_COMMENT = 902 static const TokenType MULTI_LINE_COMMENT = fasta.MULTI_LINE_COMMENT_INFO;
903 const fasta.PrecedenceInfo(null, 'MULTI_LINE_COMMENT', 0, -1);
904 903
905 static const TokenType SCRIPT_TAG = fasta.SCRIPT_INFO; 904 static const TokenType SCRIPT_TAG = fasta.SCRIPT_INFO;
906 905
907 static const TokenType SINGLE_LINE_COMMENT = 906 static const TokenType SINGLE_LINE_COMMENT = fasta.SINGLE_LINE_COMMENT_INFO;
908 const fasta.PrecedenceInfo(null, 'SINGLE_LINE_COMMENT', 0, -1);
909 907
910 static const TokenType STRING = fasta.STRING_INFO; 908 static const TokenType STRING = fasta.STRING_INFO;
911 909
912 static const TokenType AMPERSAND = fasta.AMPERSAND_INFO; 910 static const TokenType AMPERSAND = fasta.AMPERSAND_INFO;
913 911
914 static const TokenType AMPERSAND_AMPERSAND = fasta.AMPERSAND_AMPERSAND_INFO; 912 static const TokenType AMPERSAND_AMPERSAND = fasta.AMPERSAND_AMPERSAND_INFO;
915 913
916 static const TokenType AMPERSAND_AMPERSAND_EQ = 914 static const TokenType AMPERSAND_AMPERSAND_EQ =
917 const fasta.PrecedenceInfo('&&=', 'AMPERSAND_AMPERSAND_EQ', 1, -1); 915 const fasta.PrecedenceInfo('&&=', 'AMPERSAND_AMPERSAND_EQ', 1, -1);
918 916
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 1156
1159 void set precedingComments(CommentToken comment) { 1157 void set precedingComments(CommentToken comment) {
1160 _precedingComment = comment; 1158 _precedingComment = comment;
1161 _setCommentParent(_precedingComment); 1159 _setCommentParent(_precedingComment);
1162 } 1160 }
1163 1161
1164 @override 1162 @override
1165 Token copy() => 1163 Token copy() =>
1166 new TokenWithComment(type, offset, copyComments(precedingComments)); 1164 new TokenWithComment(type, offset, copyComments(precedingComments));
1167 } 1165 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/scanner/precedence.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