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

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

Issue 2944383002: translate fasta parser error to analyzer error (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT. 5 // NOTE: THIS FILE IS GENERATED. DO NOT EDIT.
6 // 6 //
7 // Instead modify 'pkg/front_end/messages.yaml' and run 7 // Instead modify 'pkg/front_end/messages.yaml' and run
8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update. 8 // 'pkg/front_end/tool/_fasta/generate_messages.dart' to update.
9 9
10 part of fasta.codes; 10 part of fasta.codes;
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 message: "Type 'void' can't be used here because it isn't a return type.", 1046 message: "Type 'void' can't be used here because it isn't a return type.",
1047 tip: 1047 tip:
1048 "Try removing 'void' keyword or replace it with 'var', 'final', or a t ype.", 1048 "Try removing 'void' keyword or replace it with 'var', 'final', or a t ype.",
1049 arguments: {}); 1049 arguments: {});
1050 } 1050 }
1051 1051
1052 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1052 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1053 const FastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType = 1053 const FastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType =
1054 const FastaCode<_BuiltInIdentifierAsType>("BuiltInIdentifierAsType", 1054 const FastaCode<_BuiltInIdentifierAsType>("BuiltInIdentifierAsType",
1055 template: r"Can't use '#lexeme' as a type.", 1055 template: r"Can't use '#lexeme' as a type.",
1056 analyzerCode: "EXPECTED_TYPE_NAME",
1056 dart2jsCode: "EXTRANEOUS_MODIFIER", 1057 dart2jsCode: "EXTRANEOUS_MODIFIER",
1057 format: _formatBuiltInIdentifierAsType); 1058 format: _formatBuiltInIdentifierAsType);
1058 1059
1059 typedef FastaMessage _BuiltInIdentifierAsType( 1060 typedef FastaMessage _BuiltInIdentifierAsType(
1060 Uri uri, int charOffset, Token token); 1061 Uri uri, int charOffset, Token token);
1061 1062
1062 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1063 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1063 FastaMessage _formatBuiltInIdentifierAsType( 1064 FastaMessage _formatBuiltInIdentifierAsType(
1064 Uri uri, int charOffset, Token token) { 1065 Uri uri, int charOffset, Token token) {
1065 String lexeme = token.lexeme; 1066 String lexeme = token.lexeme;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 1121 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
1121 FastaMessage _formatNonAsciiIdentifier( 1122 FastaMessage _formatNonAsciiIdentifier(
1122 Uri uri, int charOffset, String character, int codePoint) { 1123 Uri uri, int charOffset, String character, int codePoint) {
1123 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; 1124 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})";
1124 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier, 1125 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier,
1125 message: 1126 message:
1126 "The non-ASCII character '$character' ($unicode) can't be used in iden tifiers, only in strings and comments.", 1127 "The non-ASCII character '$character' ($unicode) can't be used in iden tifiers, only in strings and comments.",
1127 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$' (a dollar sign).", 1128 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$' (a dollar sign).",
1128 arguments: {'character': character, 'codePoint': codePoint}); 1129 arguments: {'character': character, 'codePoint': codePoint});
1129 } 1130 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | pkg/front_end/messages.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698