OLD | NEW |
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; |
11 | 11 |
12 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 12 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
13 const FastaCode<_ExpectedClassBodyToSkip> codeExpectedClassBodyToSkip = | 13 const UnboundFastaCode<_ExpectedClassBodyToSkip> codeExpectedClassBodyToSkip = |
14 const FastaCode<_ExpectedClassBodyToSkip>("ExpectedClassBodyToSkip", | 14 const UnboundFastaCode<_ExpectedClassBodyToSkip>("ExpectedClassBodyToSkip", |
15 template: r"Expected a class body, but got '#lexeme'.", | 15 template: r"""Expected a class body, but got '#lexeme'.""", |
16 dart2jsCode: "FASTA_FATAL", | 16 dart2jsCode: "FASTA_FATAL", |
17 format: _formatExpectedClassBodyToSkip); | 17 bind: _bindExpectedClassBodyToSkip); |
18 | 18 |
19 typedef FastaMessage _ExpectedClassBodyToSkip( | 19 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
20 Uri uri, int charOffset, Token token); | 20 typedef _ExpectedClassBodyToSkip = FastaMessage Function(Uri, int) Function( |
21 | 21 Token token); |
22 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 22 |
23 FastaMessage _formatExpectedClassBodyToSkip( | 23 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
24 Uri uri, int charOffset, Token token) { | 24 FastaMessage Function(Uri, int) _bindExpectedClassBodyToSkip(Token token) { |
25 String lexeme = token.lexeme; | 25 FastaMessage bind(Uri uri, int charOffset) { |
26 return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip, | 26 String lexeme = token.lexeme; |
27 message: "Expected a class body, but got '$lexeme'.", | 27 return new FastaMessage(uri, charOffset, codeExpectedClassBodyToSkip, |
28 arguments: {'token': token}); | 28 message: """Expected a class body, but got '$lexeme'.""", |
29 } | 29 arguments: {'token': token}); |
30 | 30 } |
31 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 31 |
32 const FastaCode<_FunctionTypeDefaultValue> codeFunctionTypeDefaultValue = | 32 return bind; |
33 const FastaCode<_FunctionTypeDefaultValue>("FunctionTypeDefaultValue", | 33 } |
34 template: r"Can't have a default value in a function type.", | 34 |
35 dart2jsCode: "FASTA_IGNORED", | 35 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
36 format: _formatFunctionTypeDefaultValue); | 36 const BoundFastaCode codeFunctionTypeDefaultValue = const BoundFastaCode( |
37 | 37 "FunctionTypeDefaultValue", |
38 typedef FastaMessage _FunctionTypeDefaultValue(Uri uri, int charOffset); | 38 template: r"""Can't have a default value in a function type.""", |
39 | 39 dart2jsCode: "FASTA_IGNORED"); |
40 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 40 |
41 FastaMessage _formatFunctionTypeDefaultValue(Uri uri, int charOffset) { | 41 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
42 return new FastaMessage(uri, charOffset, codeFunctionTypeDefaultValue, | 42 const BoundFastaCode codeNonInstanceTypeVariableUse = const BoundFastaCode( |
43 message: "Can't have a default value in a function type.", arguments: {}); | 43 "NonInstanceTypeVariableUse", |
44 } | 44 template: r"""Can only use type variables in instance methods."""); |
45 | 45 |
46 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 46 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
47 const FastaCode<_StackOverflow> codeStackOverflow = | 47 const BoundFastaCode codeStackOverflow = const BoundFastaCode("StackOverflow", |
48 const FastaCode<_StackOverflow>("StackOverflow", | 48 template: r"""Stack overflow.""", dart2jsCode: "GENERIC"); |
49 template: r"Stack overflow.", | 49 |
50 dart2jsCode: "GENERIC", | 50 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
51 format: _formatStackOverflow); | 51 const UnboundFastaCode<_CyclicTypedef> codeCyclicTypedef = |
52 | 52 const UnboundFastaCode<_CyclicTypedef>("CyclicTypedef", |
53 typedef FastaMessage _StackOverflow(Uri uri, int charOffset); | 53 template: r"""The typedef '#name' has a reference to itself.""", |
54 | 54 bind: _bindCyclicTypedef); |
55 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 55 |
56 FastaMessage _formatStackOverflow(Uri uri, int charOffset) { | 56 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
57 return new FastaMessage(uri, charOffset, codeStackOverflow, | 57 typedef _CyclicTypedef = FastaMessage Function(Uri, int) Function(String name); |
58 message: "Stack overflow.", arguments: {}); | 58 |
59 } | 59 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
60 | 60 FastaMessage Function(Uri, int) _bindCyclicTypedef(String name) { |
61 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 61 FastaMessage bind(Uri uri, int charOffset) { |
62 const FastaCode<_AssertExtraneousArgument> codeAssertExtraneousArgument = | 62 return new FastaMessage(uri, charOffset, codeCyclicTypedef, |
63 const FastaCode<_AssertExtraneousArgument>("AssertExtraneousArgument", | 63 message: """The typedef '$name' has a reference to itself.""", |
64 template: r"`assert` can't have more than two arguments.", | 64 arguments: {'name': name}); |
| 65 } |
| 66 |
| 67 return bind; |
| 68 } |
| 69 |
| 70 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 71 const BoundFastaCode codeAssertExtraneousArgument = const BoundFastaCode( |
| 72 "AssertExtraneousArgument", |
| 73 template: r"""`assert` can't have more than two arguments.""", |
| 74 dart2jsCode: "FASTA_FATAL"); |
| 75 |
| 76 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 77 const UnboundFastaCode<_UnexpectedToken> codeUnexpectedToken = |
| 78 const UnboundFastaCode<_UnexpectedToken>("UnexpectedToken", |
| 79 template: r"""Unexpected token '#lexeme'.""", |
65 dart2jsCode: "FASTA_FATAL", | 80 dart2jsCode: "FASTA_FATAL", |
66 format: _formatAssertExtraneousArgument); | 81 bind: _bindUnexpectedToken); |
67 | 82 |
68 typedef FastaMessage _AssertExtraneousArgument(Uri uri, int charOffset); | 83 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
69 | 84 typedef _UnexpectedToken = FastaMessage Function(Uri, int) Function( |
70 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 85 Token token); |
71 FastaMessage _formatAssertExtraneousArgument(Uri uri, int charOffset) { | 86 |
72 return new FastaMessage(uri, charOffset, codeAssertExtraneousArgument, | 87 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
73 message: "`assert` can't have more than two arguments.", arguments: {}); | 88 FastaMessage Function(Uri, int) _bindUnexpectedToken(Token token) { |
74 } | 89 FastaMessage bind(Uri uri, int charOffset) { |
75 | 90 String lexeme = token.lexeme; |
76 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 91 return new FastaMessage(uri, charOffset, codeUnexpectedToken, |
77 const FastaCode<_UnexpectedToken> codeUnexpectedToken = | 92 message: """Unexpected token '$lexeme'.""", |
78 const FastaCode<_UnexpectedToken>("UnexpectedToken", | 93 arguments: {'token': token}); |
79 template: r"Unexpected token '#lexeme'.", | 94 } |
80 dart2jsCode: "FASTA_FATAL", | 95 |
81 format: _formatUnexpectedToken); | 96 return bind; |
82 | 97 } |
83 typedef FastaMessage _UnexpectedToken(Uri uri, int charOffset, Token token); | 98 |
84 | 99 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
85 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 100 const BoundFastaCode codeAwaitAsIdentifier = const BoundFastaCode( |
86 FastaMessage _formatUnexpectedToken(Uri uri, int charOffset, Token token) { | 101 "AwaitAsIdentifier", |
87 String lexeme = token.lexeme; | 102 template: |
88 return new FastaMessage(uri, charOffset, codeUnexpectedToken, | 103 r"""'await' can't be used as an identifier in 'async', 'async*', or 'syn
c*' methods.""", |
89 message: "Unexpected token '$lexeme'.", arguments: {'token': token}); | 104 dart2jsCode: "FASTA_IGNORED"); |
90 } | 105 |
91 | 106 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
92 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 107 const BoundFastaCode codeFactoryNotSync = const BoundFastaCode("FactoryNotSync", |
93 const FastaCode<_AwaitAsIdentifier> codeAwaitAsIdentifier = const FastaCode< | 108 template: r"""Factories can't use 'async', 'async*', or 'sync*'.""", |
94 _AwaitAsIdentifier>("AwaitAsIdentifier", | 109 dart2jsCode: "FASTA_IGNORED"); |
95 template: | 110 |
96 r"'await' can't be used as an identifier in 'async', 'async*', or 'sync*
' methods.", | 111 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
97 dart2jsCode: "FASTA_IGNORED", | 112 const BoundFastaCode codeSuperNullAware = const BoundFastaCode("SuperNullAware", |
98 format: _formatAwaitAsIdentifier); | 113 template: r"""'super' can't be null.""", |
99 | 114 tip: r"""Try replacing '?.' with '.'""", |
100 typedef FastaMessage _AwaitAsIdentifier(Uri uri, int charOffset); | 115 dart2jsCode: "FASTA_IGNORED"); |
101 | 116 |
102 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 117 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
103 FastaMessage _formatAwaitAsIdentifier(Uri uri, int charOffset) { | 118 const BoundFastaCode codePrivateNamedParameter = const BoundFastaCode( |
104 return new FastaMessage(uri, charOffset, codeAwaitAsIdentifier, | 119 "PrivateNamedParameter", |
105 message: | 120 template: r"""An optional named parameter can't start with '_'.""", |
106 "'await' can't be used as an identifier in 'async', 'async*', or 'sync
*' methods.", | 121 dart2jsCode: "FASTA_IGNORED"); |
107 arguments: {}); | 122 |
108 } | 123 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
109 | 124 const BoundFastaCode codeYieldNotGenerator = const BoundFastaCode( |
110 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 125 "YieldNotGenerator", |
111 const FastaCode<_FactoryNotSync> codeFactoryNotSync = | 126 template: r"""'yield' can only be used in 'sync*' or 'async*' methods.""", |
112 const FastaCode<_FactoryNotSync>("FactoryNotSync", | 127 dart2jsCode: "FASTA_IGNORED"); |
113 template: r"Factories can't use 'async', 'async*', or 'sync*'.", | 128 |
114 dart2jsCode: "FASTA_IGNORED", | 129 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
115 format: _formatFactoryNotSync); | 130 const BoundFastaCode codeSetterNotSync = const BoundFastaCode("SetterNotSync", |
116 | 131 template: r"""Setters can't use 'async', 'async*', or 'sync*'.""", |
117 typedef FastaMessage _FactoryNotSync(Uri uri, int charOffset); | 132 dart2jsCode: "FASTA_IGNORED"); |
118 | 133 |
119 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 134 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
120 FastaMessage _formatFactoryNotSync(Uri uri, int charOffset) { | 135 const UnboundFastaCode< |
121 return new FastaMessage(uri, charOffset, codeFactoryNotSync, | 136 _NonAsciiWhitespace> codeNonAsciiWhitespace = const UnboundFastaCode< |
122 message: "Factories can't use 'async', 'async*', or 'sync*'.", | |
123 arguments: {}); | |
124 } | |
125 | |
126 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
127 const FastaCode<_SuperNullAware> codeSuperNullAware = | |
128 const FastaCode<_SuperNullAware>("SuperNullAware", | |
129 template: r"'super' can't be null.", | |
130 tip: r"Try replacing '?.' with '.'", | |
131 dart2jsCode: "FASTA_IGNORED", | |
132 format: _formatSuperNullAware); | |
133 | |
134 typedef FastaMessage _SuperNullAware(Uri uri, int charOffset); | |
135 | |
136 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
137 FastaMessage _formatSuperNullAware(Uri uri, int charOffset) { | |
138 return new FastaMessage(uri, charOffset, codeSuperNullAware, | |
139 message: "'super' can't be null.", | |
140 tip: "Try replacing '?.' with '.'", | |
141 arguments: {}); | |
142 } | |
143 | |
144 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
145 const FastaCode<_PrivateNamedParameter> codePrivateNamedParameter = | |
146 const FastaCode<_PrivateNamedParameter>("PrivateNamedParameter", | |
147 template: r"An optional named parameter can't start with '_'.", | |
148 dart2jsCode: "FASTA_IGNORED", | |
149 format: _formatPrivateNamedParameter); | |
150 | |
151 typedef FastaMessage _PrivateNamedParameter(Uri uri, int charOffset); | |
152 | |
153 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
154 FastaMessage _formatPrivateNamedParameter(Uri uri, int charOffset) { | |
155 return new FastaMessage(uri, charOffset, codePrivateNamedParameter, | |
156 message: "An optional named parameter can't start with '_'.", | |
157 arguments: {}); | |
158 } | |
159 | |
160 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
161 const FastaCode<_YieldNotGenerator> codeYieldNotGenerator = | |
162 const FastaCode<_YieldNotGenerator>("YieldNotGenerator", | |
163 template: r"'yield' can only be used in 'sync*' or 'async*' methods.", | |
164 dart2jsCode: "FASTA_IGNORED", | |
165 format: _formatYieldNotGenerator); | |
166 | |
167 typedef FastaMessage _YieldNotGenerator(Uri uri, int charOffset); | |
168 | |
169 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
170 FastaMessage _formatYieldNotGenerator(Uri uri, int charOffset) { | |
171 return new FastaMessage(uri, charOffset, codeYieldNotGenerator, | |
172 message: "'yield' can only be used in 'sync*' or 'async*' methods.", | |
173 arguments: {}); | |
174 } | |
175 | |
176 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
177 const FastaCode<_SetterNotSync> codeSetterNotSync = | |
178 const FastaCode<_SetterNotSync>("SetterNotSync", | |
179 template: r"Setters can't use 'async', 'async*', or 'sync*'.", | |
180 dart2jsCode: "FASTA_IGNORED", | |
181 format: _formatSetterNotSync); | |
182 | |
183 typedef FastaMessage _SetterNotSync(Uri uri, int charOffset); | |
184 | |
185 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
186 FastaMessage _formatSetterNotSync(Uri uri, int charOffset) { | |
187 return new FastaMessage(uri, charOffset, codeSetterNotSync, | |
188 message: "Setters can't use 'async', 'async*', or 'sync*'.", | |
189 arguments: {}); | |
190 } | |
191 | |
192 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
193 const FastaCode<_NonAsciiWhitespace> codeNonAsciiWhitespace = const FastaCode< | |
194 _NonAsciiWhitespace>("NonAsciiWhitespace", | 137 _NonAsciiWhitespace>("NonAsciiWhitespace", |
195 template: | 138 template: |
196 r"The non-ASCII space character #unicode can only be used in strings and
comments.", | 139 r"""The non-ASCII space character #unicode can only be used in strings a
nd comments.""", |
197 analyzerCode: "ILLEGAL_CHARACTER", | 140 analyzerCode: "ILLEGAL_CHARACTER", |
198 dart2jsCode: "BAD_INPUT_CHARACTER", | 141 dart2jsCode: "BAD_INPUT_CHARACTER", |
199 format: _formatNonAsciiWhitespace); | 142 bind: _bindNonAsciiWhitespace); |
200 | 143 |
201 typedef FastaMessage _NonAsciiWhitespace( | 144 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
202 Uri uri, int charOffset, int codePoint); | 145 typedef _NonAsciiWhitespace = FastaMessage Function(Uri, int) Function( |
203 | 146 int codePoint); |
204 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 147 |
205 FastaMessage _formatNonAsciiWhitespace(Uri uri, int charOffset, int codePoint) { | 148 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
206 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; | 149 FastaMessage Function(Uri, int) _bindNonAsciiWhitespace(int codePoint) { |
207 return new FastaMessage(uri, charOffset, codeNonAsciiWhitespace, | 150 FastaMessage bind(Uri uri, int charOffset) { |
208 message: | 151 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; |
209 "The non-ASCII space character $unicode can only be used in strings an
d comments.", | 152 return new FastaMessage(uri, charOffset, codeNonAsciiWhitespace, |
210 arguments: {'codePoint': codePoint}); | 153 message: |
211 } | 154 """The non-ASCII space character $unicode can only be used in string
s and comments.""", |
212 | 155 arguments: {'codePoint': codePoint}); |
213 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 156 } |
214 const FastaCode<_ExpectedIdentifier> codeExpectedIdentifier = | 157 |
215 const FastaCode<_ExpectedIdentifier>("ExpectedIdentifier", | 158 return bind; |
216 template: r"'#lexeme' is a reserved word and can't be used here.", | 159 } |
217 tip: r"Try using a different name.", | 160 |
| 161 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 162 const UnboundFastaCode<_ExpectedIdentifier> codeExpectedIdentifier = |
| 163 const UnboundFastaCode<_ExpectedIdentifier>("ExpectedIdentifier", |
| 164 template: r"""'#lexeme' is a reserved word and can't be used here.""", |
| 165 tip: r"""Try using a different name.""", |
218 dart2jsCode: "EXPECTED_IDENTIFIER", | 166 dart2jsCode: "EXPECTED_IDENTIFIER", |
219 format: _formatExpectedIdentifier); | 167 bind: _bindExpectedIdentifier); |
220 | 168 |
221 typedef FastaMessage _ExpectedIdentifier(Uri uri, int charOffset, Token token); | 169 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
222 | 170 typedef _ExpectedIdentifier = FastaMessage Function(Uri, int) Function( |
223 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 171 Token token); |
224 FastaMessage _formatExpectedIdentifier(Uri uri, int charOffset, Token token) { | 172 |
225 String lexeme = token.lexeme; | 173 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
226 return new FastaMessage(uri, charOffset, codeExpectedIdentifier, | 174 FastaMessage Function(Uri, int) _bindExpectedIdentifier(Token token) { |
227 message: "'$lexeme' is a reserved word and can't be used here.", | 175 FastaMessage bind(Uri uri, int charOffset) { |
228 tip: "Try using a different name.", | 176 String lexeme = token.lexeme; |
229 arguments: {'token': token}); | 177 return new FastaMessage(uri, charOffset, codeExpectedIdentifier, |
230 } | 178 message: """'$lexeme' is a reserved word and can't be used here.""", |
231 | 179 tip: """Try using a different name.""", |
232 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 180 arguments: {'token': token}); |
233 const FastaCode<_ExpectedBlockToSkip> codeExpectedBlockToSkip = | 181 } |
234 const FastaCode<_ExpectedBlockToSkip>("ExpectedBlockToSkip", | 182 |
235 template: r"Expected a function body or '=>'.", | 183 return bind; |
236 tip: r"Try adding {}.", | 184 } |
237 dart2jsCode: "NATIVE_OR_BODY_EXPECTED", | 185 |
238 format: _formatExpectedBlockToSkip); | 186 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
239 | 187 const BoundFastaCode codeExpectedBlockToSkip = const BoundFastaCode( |
240 typedef FastaMessage _ExpectedBlockToSkip(Uri uri, int charOffset); | 188 "ExpectedBlockToSkip", |
241 | 189 template: r"""Expected a function body or '=>'.""", |
242 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 190 tip: r"""Try adding {}.""", |
243 FastaMessage _formatExpectedBlockToSkip(Uri uri, int charOffset) { | 191 dart2jsCode: "NATIVE_OR_BODY_EXPECTED"); |
244 return new FastaMessage(uri, charOffset, codeExpectedBlockToSkip, | 192 |
245 message: "Expected a function body or '=>'.", | 193 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
246 tip: "Try adding {}.", | 194 const BoundFastaCode codeRequiredParameterWithDefault = const BoundFastaCode( |
247 arguments: {}); | 195 "RequiredParameterWithDefault", |
248 } | 196 template: r"""Non-optional parameters can't have a default value.""", |
249 | |
250 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
251 const FastaCode< | |
252 _RequiredParameterWithDefault> codeRequiredParameterWithDefault = | |
253 const FastaCode<_RequiredParameterWithDefault>( | |
254 "RequiredParameterWithDefault", | |
255 template: r"Non-optional parameters can't have a default value.", | |
256 tip: | |
257 r"Try removing the default value or making the parameter optional.", | |
258 dart2jsCode: "REQUIRED_PARAMETER_WITH_DEFAULT", | |
259 format: _formatRequiredParameterWithDefault); | |
260 | |
261 typedef FastaMessage _RequiredParameterWithDefault(Uri uri, int charOffset); | |
262 | |
263 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
264 FastaMessage _formatRequiredParameterWithDefault(Uri uri, int charOffset) { | |
265 return new FastaMessage(uri, charOffset, codeRequiredParameterWithDefault, | |
266 message: "Non-optional parameters can't have a default value.", | |
267 tip: "Try removing the default value or making the parameter optional.", | |
268 arguments: {}); | |
269 } | |
270 | |
271 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
272 const FastaCode<_Unspecified> codeUnspecified = const FastaCode<_Unspecified>( | |
273 "Unspecified", | |
274 template: r"#string", | |
275 dart2jsCode: "GENERIC", | |
276 format: _formatUnspecified); | |
277 | |
278 typedef FastaMessage _Unspecified(Uri uri, int charOffset, String string); | |
279 | |
280 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
281 FastaMessage _formatUnspecified(Uri uri, int charOffset, String string) { | |
282 return new FastaMessage(uri, charOffset, codeUnspecified, | |
283 message: "$string", arguments: {'string': string}); | |
284 } | |
285 | |
286 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
287 const FastaCode<_MissingExponent> codeMissingExponent = const FastaCode< | |
288 _MissingExponent>("MissingExponent", | |
289 template: | |
290 r"Numbers in exponential notation should always contain an exponent (an
integer number with an optional sign).", | |
291 tip: | 197 tip: |
292 r"Make sure there is an exponent, and remove any whitespace before it.", | 198 r"""Try removing the default value or making the parameter optional.""", |
| 199 dart2jsCode: "REQUIRED_PARAMETER_WITH_DEFAULT"); |
| 200 |
| 201 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 202 const UnboundFastaCode<_Unspecified> codeUnspecified = |
| 203 const UnboundFastaCode<_Unspecified>("Unspecified", |
| 204 template: r"""#string""", |
| 205 dart2jsCode: "GENERIC", |
| 206 bind: _bindUnspecified); |
| 207 |
| 208 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 209 typedef _Unspecified = FastaMessage Function(Uri, int) Function(String string); |
| 210 |
| 211 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 212 FastaMessage Function(Uri, int) _bindUnspecified(String string) { |
| 213 FastaMessage bind(Uri uri, int charOffset) { |
| 214 return new FastaMessage(uri, charOffset, codeUnspecified, |
| 215 message: """$string""", arguments: {'string': string}); |
| 216 } |
| 217 |
| 218 return bind; |
| 219 } |
| 220 |
| 221 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 222 const BoundFastaCode codeMissingExponent = const BoundFastaCode( |
| 223 "MissingExponent", |
| 224 template: |
| 225 r"""Numbers in exponential notation should always contain an exponent (a
n integer number with an optional sign).""", |
| 226 tip: |
| 227 r"""Make sure there is an exponent, and remove any whitespace before it.
""", |
293 analyzerCode: "MISSING_DIGIT", | 228 analyzerCode: "MISSING_DIGIT", |
294 dart2jsCode: "EXPONENT_MISSING", | 229 dart2jsCode: "EXPONENT_MISSING"); |
295 format: _formatMissingExponent); | 230 |
296 | 231 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
297 typedef FastaMessage _MissingExponent(Uri uri, int charOffset); | 232 const BoundFastaCode codePositionalParameterWithEquals = const BoundFastaCode( |
298 | 233 "PositionalParameterWithEquals", |
299 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 234 template: |
300 FastaMessage _formatMissingExponent(Uri uri, int charOffset) { | 235 r"""Positional optional parameters can't use ':' to specify a default va
lue.""", |
301 return new FastaMessage(uri, charOffset, codeMissingExponent, | 236 tip: r"""Try replacing ':' with '='.""", |
302 message: | 237 dart2jsCode: "POSITIONAL_PARAMETER_WITH_EQUALS"); |
303 "Numbers in exponential notation should always contain an exponent (an
integer number with an optional sign).", | 238 |
304 tip: | 239 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
305 "Make sure there is an exponent, and remove any whitespace before it."
, | 240 const BoundFastaCode codeUnexpectedDollarInString = const BoundFastaCode( |
306 arguments: {}); | 241 "UnexpectedDollarInString", |
307 } | 242 template: |
308 | 243 r"""A '$' has special meaning inside a string, and must be followed by a
n identifier or an expression in curly braces ({}).""", |
309 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 244 tip: r"""Try adding a backslash (\) to escape the '$'.""", |
310 const FastaCode<_PositionalParameterWithEquals> | 245 dart2jsCode: "MALFORMED_STRING_LITERAL"); |
311 codePositionalParameterWithEquals = | 246 |
312 const FastaCode<_PositionalParameterWithEquals>( | 247 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
313 "PositionalParameterWithEquals", | 248 const BoundFastaCode codeFinalFieldWithoutInitializer = const BoundFastaCode( |
314 template: | 249 "FinalFieldWithoutInitializer", |
315 r"Positional optional parameters can't use ':' to specify a default
value.", | 250 template: r"""A 'final' field must be initialized.""", |
316 tip: r"Try replacing ':' with '='.", | 251 tip: r"""Try adding '= <initializer>'.""", |
317 dart2jsCode: "POSITIONAL_PARAMETER_WITH_EQUALS", | 252 dart2jsCode: "FASTA_IGNORED"); |
318 format: _formatPositionalParameterWithEquals); | 253 |
319 | 254 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
320 typedef FastaMessage _PositionalParameterWithEquals(Uri uri, int charOffset); | 255 const UnboundFastaCode<_ExtraneousModifier> codeExtraneousModifier = |
321 | 256 const UnboundFastaCode<_ExtraneousModifier>("ExtraneousModifier", |
322 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 257 template: r"""Can't have modifier '#lexeme' here.""", |
323 FastaMessage _formatPositionalParameterWithEquals(Uri uri, int charOffset) { | 258 tip: r"""Try removing '#lexeme'.""", |
324 return new FastaMessage(uri, charOffset, codePositionalParameterWithEquals, | |
325 message: | |
326 "Positional optional parameters can't use ':' to specify a default val
ue.", | |
327 tip: "Try replacing ':' with '='.", | |
328 arguments: {}); | |
329 } | |
330 | |
331 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
332 const FastaCode< | |
333 _UnexpectedDollarInString> codeUnexpectedDollarInString = const FastaCode< | |
334 _UnexpectedDollarInString>("UnexpectedDollarInString", | |
335 template: | |
336 r"A '$' has special meaning inside a string, and must be followed by an
identifier or an expression in curly braces ({}).", | |
337 tip: r"Try adding a backslash (\) to escape the '$'.", | |
338 dart2jsCode: "MALFORMED_STRING_LITERAL", | |
339 format: _formatUnexpectedDollarInString); | |
340 | |
341 typedef FastaMessage _UnexpectedDollarInString(Uri uri, int charOffset); | |
342 | |
343 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
344 FastaMessage _formatUnexpectedDollarInString(Uri uri, int charOffset) { | |
345 return new FastaMessage(uri, charOffset, codeUnexpectedDollarInString, | |
346 message: | |
347 "A '\$' has special meaning inside a string, and must be followed by a
n identifier or an expression in curly braces ({}).", | |
348 tip: "Try adding a backslash (\) to escape the '\$'.", | |
349 arguments: {}); | |
350 } | |
351 | |
352 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
353 const FastaCode<_FinalFieldWithoutInitializer> | |
354 codeFinalFieldWithoutInitializer = | |
355 const FastaCode<_FinalFieldWithoutInitializer>( | |
356 "FinalFieldWithoutInitializer", | |
357 template: r"A 'final' field must be initialized.", | |
358 tip: r"Try adding '= <initializer>'.", | |
359 dart2jsCode: "FASTA_IGNORED", | |
360 format: _formatFinalFieldWithoutInitializer); | |
361 | |
362 typedef FastaMessage _FinalFieldWithoutInitializer(Uri uri, int charOffset); | |
363 | |
364 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
365 FastaMessage _formatFinalFieldWithoutInitializer(Uri uri, int charOffset) { | |
366 return new FastaMessage(uri, charOffset, codeFinalFieldWithoutInitializer, | |
367 message: "A 'final' field must be initialized.", | |
368 tip: "Try adding '= <initializer>'.", | |
369 arguments: {}); | |
370 } | |
371 | |
372 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
373 const FastaCode<_ExtraneousModifier> codeExtraneousModifier = | |
374 const FastaCode<_ExtraneousModifier>("ExtraneousModifier", | |
375 template: r"Can't have modifier '#lexeme' here.", | |
376 tip: r"Try removing '#lexeme'.", | |
377 dart2jsCode: "EXTRANEOUS_MODIFIER", | 259 dart2jsCode: "EXTRANEOUS_MODIFIER", |
378 format: _formatExtraneousModifier); | 260 bind: _bindExtraneousModifier); |
379 | 261 |
380 typedef FastaMessage _ExtraneousModifier(Uri uri, int charOffset, Token token); | 262 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
381 | 263 typedef _ExtraneousModifier = FastaMessage Function(Uri, int) Function( |
382 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 264 Token token); |
383 FastaMessage _formatExtraneousModifier(Uri uri, int charOffset, Token token) { | 265 |
384 String lexeme = token.lexeme; | 266 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
385 return new FastaMessage(uri, charOffset, codeExtraneousModifier, | 267 FastaMessage Function(Uri, int) _bindExtraneousModifier(Token token) { |
386 message: "Can't have modifier '$lexeme' here.", | 268 FastaMessage bind(Uri uri, int charOffset) { |
387 tip: "Try removing '$lexeme'.", | 269 String lexeme = token.lexeme; |
388 arguments: {'token': token}); | 270 return new FastaMessage(uri, charOffset, codeExtraneousModifier, |
389 } | 271 message: """Can't have modifier '$lexeme' here.""", |
390 | 272 tip: """Try removing '$lexeme'.""", |
391 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 273 arguments: {'token': token}); |
392 const FastaCode<_EmptyOptionalParameterList> codeEmptyOptionalParameterList = | 274 } |
393 const FastaCode<_EmptyOptionalParameterList>("EmptyOptionalParameterList", | 275 |
394 template: r"Optional parameter lists cannot be empty.", | 276 return bind; |
395 tip: r"Try adding an optional parameter to the list.", | 277 } |
396 dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST", | 278 |
397 format: _formatEmptyOptionalParameterList); | 279 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
398 | 280 const BoundFastaCode codeEmptyOptionalParameterList = const BoundFastaCode( |
399 typedef FastaMessage _EmptyOptionalParameterList(Uri uri, int charOffset); | 281 "EmptyOptionalParameterList", |
400 | 282 template: r"""Optional parameter lists cannot be empty.""", |
401 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 283 tip: r"""Try adding an optional parameter to the list.""", |
402 FastaMessage _formatEmptyOptionalParameterList(Uri uri, int charOffset) { | 284 dart2jsCode: "EMPTY_OPTIONAL_PARAMETER_LIST"); |
403 return new FastaMessage(uri, charOffset, codeEmptyOptionalParameterList, | 285 |
404 message: "Optional parameter lists cannot be empty.", | 286 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
405 tip: "Try adding an optional parameter to the list.", | 287 const UnboundFastaCode<_TypeNotFound> codeTypeNotFound = |
406 arguments: {}); | 288 const UnboundFastaCode<_TypeNotFound>("TypeNotFound", |
407 } | 289 template: r"""Type '#name' not found.""", bind: _bindTypeNotFound); |
408 | 290 |
409 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 291 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
410 const FastaCode<_UnterminatedString> codeUnterminatedString = | 292 typedef _TypeNotFound = FastaMessage Function(Uri, int) Function(String name); |
411 const FastaCode<_UnterminatedString>("UnterminatedString", | 293 |
412 template: r"String must end with #string.", | 294 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 295 FastaMessage Function(Uri, int) _bindTypeNotFound(String name) { |
| 296 FastaMessage bind(Uri uri, int charOffset) { |
| 297 return new FastaMessage(uri, charOffset, codeTypeNotFound, |
| 298 message: """Type '$name' not found.""", arguments: {'name': name}); |
| 299 } |
| 300 |
| 301 return bind; |
| 302 } |
| 303 |
| 304 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 305 const UnboundFastaCode<_UnterminatedString> codeUnterminatedString = |
| 306 const UnboundFastaCode<_UnterminatedString>("UnterminatedString", |
| 307 template: r"""String must end with #string.""", |
413 analyzerCode: "UNTERMINATED_STRING_LITERAL", | 308 analyzerCode: "UNTERMINATED_STRING_LITERAL", |
414 dart2jsCode: "UNTERMINATED_STRING", | 309 dart2jsCode: "UNTERMINATED_STRING", |
415 format: _formatUnterminatedString); | 310 bind: _bindUnterminatedString); |
416 | 311 |
417 typedef FastaMessage _UnterminatedString( | 312 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
418 Uri uri, int charOffset, String string); | 313 typedef _UnterminatedString = FastaMessage Function(Uri, int) Function( |
419 | 314 String string); |
420 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 315 |
421 FastaMessage _formatUnterminatedString(Uri uri, int charOffset, String string) { | 316 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
422 return new FastaMessage(uri, charOffset, codeUnterminatedString, | 317 FastaMessage Function(Uri, int) _bindUnterminatedString(String string) { |
423 message: "String must end with $string.", arguments: {'string': string}); | 318 FastaMessage bind(Uri uri, int charOffset) { |
424 } | 319 return new FastaMessage(uri, charOffset, codeUnterminatedString, |
425 | 320 message: """String must end with $string.""", |
426 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 321 arguments: {'string': string}); |
427 const FastaCode<_AwaitNotAsync> codeAwaitNotAsync = | 322 } |
428 const FastaCode<_AwaitNotAsync>("AwaitNotAsync", | 323 |
429 template: r"'await' can only be used in 'async' or 'async*' methods.", | 324 return bind; |
430 dart2jsCode: "FASTA_IGNORED", | 325 } |
431 format: _formatAwaitNotAsync); | 326 |
432 | 327 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
433 typedef FastaMessage _AwaitNotAsync(Uri uri, int charOffset); | 328 const BoundFastaCode codeAwaitNotAsync = const BoundFastaCode("AwaitNotAsync", |
434 | 329 template: r"""'await' can only be used in 'async' or 'async*' methods.""", |
435 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 330 dart2jsCode: "FASTA_IGNORED"); |
436 FastaMessage _formatAwaitNotAsync(Uri uri, int charOffset) { | 331 |
437 return new FastaMessage(uri, charOffset, codeAwaitNotAsync, | 332 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
438 message: "'await' can only be used in 'async' or 'async*' methods.", | 333 const UnboundFastaCode<_ExpectedFunctionBody> codeExpectedFunctionBody = |
439 arguments: {}); | 334 const UnboundFastaCode<_ExpectedFunctionBody>("ExpectedFunctionBody", |
440 } | 335 template: r"""Expected a function body, but got '#lexeme'.""", |
441 | |
442 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
443 const FastaCode<_ExpectedFunctionBody> codeExpectedFunctionBody = | |
444 const FastaCode<_ExpectedFunctionBody>("ExpectedFunctionBody", | |
445 template: r"Expected a function body, but got '#lexeme'.", | |
446 dart2jsCode: "NATIVE_OR_FATAL", | 336 dart2jsCode: "NATIVE_OR_FATAL", |
447 format: _formatExpectedFunctionBody); | 337 bind: _bindExpectedFunctionBody); |
448 | 338 |
449 typedef FastaMessage _ExpectedFunctionBody( | 339 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
450 Uri uri, int charOffset, Token token); | 340 typedef _ExpectedFunctionBody = FastaMessage Function(Uri, int) Function( |
451 | 341 Token token); |
452 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 342 |
453 FastaMessage _formatExpectedFunctionBody(Uri uri, int charOffset, Token token) { | 343 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
454 String lexeme = token.lexeme; | 344 FastaMessage Function(Uri, int) _bindExpectedFunctionBody(Token token) { |
455 return new FastaMessage(uri, charOffset, codeExpectedFunctionBody, | 345 FastaMessage bind(Uri uri, int charOffset) { |
456 message: "Expected a function body, but got '$lexeme'.", | 346 String lexeme = token.lexeme; |
457 arguments: {'token': token}); | 347 return new FastaMessage(uri, charOffset, codeExpectedFunctionBody, |
458 } | 348 message: """Expected a function body, but got '$lexeme'.""", |
459 | 349 arguments: {'token': token}); |
460 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 350 } |
461 const FastaCode<_ExpectedHexDigit> codeExpectedHexDigit = | 351 |
462 const FastaCode<_ExpectedHexDigit>("ExpectedHexDigit", | 352 return bind; |
463 template: r"A hex digit (0-9 or A-F) must follow '0x'.", | 353 } |
464 analyzerCode: "MISSING_HEX_DIGIT", | 354 |
465 dart2jsCode: "HEX_DIGIT_EXPECTED", | 355 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
466 format: _formatExpectedHexDigit); | 356 const BoundFastaCode codeExpectedHexDigit = const BoundFastaCode( |
467 | 357 "ExpectedHexDigit", |
468 typedef FastaMessage _ExpectedHexDigit(Uri uri, int charOffset); | 358 template: r"""A hex digit (0-9 or A-F) must follow '0x'.""", |
469 | 359 analyzerCode: "MISSING_HEX_DIGIT", |
470 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 360 dart2jsCode: "HEX_DIGIT_EXPECTED"); |
471 FastaMessage _formatExpectedHexDigit(Uri uri, int charOffset) { | 361 |
472 return new FastaMessage(uri, charOffset, codeExpectedHexDigit, | 362 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
473 message: "A hex digit (0-9 or A-F) must follow '0x'.", arguments: {}); | 363 const BoundFastaCode codeEmptyNamedParameterList = const BoundFastaCode( |
474 } | 364 "EmptyNamedParameterList", |
475 | 365 template: r"""Named parameter lists cannot be empty.""", |
476 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 366 tip: r"""Try adding a named parameter to the list.""", |
477 const FastaCode<_EmptyNamedParameterList> codeEmptyNamedParameterList = | 367 dart2jsCode: "EMPTY_NAMED_PARAMETER_LIST"); |
478 const FastaCode<_EmptyNamedParameterList>("EmptyNamedParameterList", | 368 |
479 template: r"Named parameter lists cannot be empty.", | 369 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
480 tip: r"Try adding a named parameter to the list.", | 370 const BoundFastaCode codeUnsupportedPrefixPlus = const BoundFastaCode( |
481 dart2jsCode: "EMPTY_NAMED_PARAMETER_LIST", | 371 "UnsupportedPrefixPlus", |
482 format: _formatEmptyNamedParameterList); | 372 template: r"""'+' is not a prefix operator. """, |
483 | 373 tip: r"""Try removing '+'.""", |
484 typedef FastaMessage _EmptyNamedParameterList(Uri uri, int charOffset); | 374 dart2jsCode: "UNSUPPORTED_PREFIX_PLUS"); |
485 | 375 |
486 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 376 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
487 FastaMessage _formatEmptyNamedParameterList(Uri uri, int charOffset) { | 377 const UnboundFastaCode<_ExpectedString> codeExpectedString = |
488 return new FastaMessage(uri, charOffset, codeEmptyNamedParameterList, | 378 const UnboundFastaCode<_ExpectedString>("ExpectedString", |
489 message: "Named parameter lists cannot be empty.", | 379 template: r"""Expected a String, but got '#lexeme'.""", |
490 tip: "Try adding a named parameter to the list.", | |
491 arguments: {}); | |
492 } | |
493 | |
494 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
495 const FastaCode<_UnsupportedPrefixPlus> codeUnsupportedPrefixPlus = | |
496 const FastaCode<_UnsupportedPrefixPlus>("UnsupportedPrefixPlus", | |
497 template: r"'+' is not a prefix operator. ", | |
498 tip: r"Try removing '+'.", | |
499 dart2jsCode: "UNSUPPORTED_PREFIX_PLUS", | |
500 format: _formatUnsupportedPrefixPlus); | |
501 | |
502 typedef FastaMessage _UnsupportedPrefixPlus(Uri uri, int charOffset); | |
503 | |
504 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
505 FastaMessage _formatUnsupportedPrefixPlus(Uri uri, int charOffset) { | |
506 return new FastaMessage(uri, charOffset, codeUnsupportedPrefixPlus, | |
507 message: "'+' is not a prefix operator. ", | |
508 tip: "Try removing '+'.", | |
509 arguments: {}); | |
510 } | |
511 | |
512 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
513 const FastaCode<_ExpectedString> codeExpectedString = | |
514 const FastaCode<_ExpectedString>("ExpectedString", | |
515 template: r"Expected a String, but got '#lexeme'.", | |
516 dart2jsCode: "FASTA_FATAL", | 380 dart2jsCode: "FASTA_FATAL", |
517 format: _formatExpectedString); | 381 bind: _bindExpectedString); |
518 | 382 |
519 typedef FastaMessage _ExpectedString(Uri uri, int charOffset, Token token); | 383 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
520 | 384 typedef _ExpectedString = FastaMessage Function(Uri, int) Function(Token token); |
521 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 385 |
522 FastaMessage _formatExpectedString(Uri uri, int charOffset, Token token) { | 386 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
523 String lexeme = token.lexeme; | 387 FastaMessage Function(Uri, int) _bindExpectedString(Token token) { |
524 return new FastaMessage(uri, charOffset, codeExpectedString, | 388 FastaMessage bind(Uri uri, int charOffset) { |
525 message: "Expected a String, but got '$lexeme'.", | 389 String lexeme = token.lexeme; |
526 arguments: {'token': token}); | 390 return new FastaMessage(uri, charOffset, codeExpectedString, |
527 } | 391 message: """Expected a String, but got '$lexeme'.""", |
528 | 392 arguments: {'token': token}); |
529 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 393 } |
530 const FastaCode<_TypeAfterVar> codeTypeAfterVar = | 394 |
531 const FastaCode<_TypeAfterVar>("TypeAfterVar", | 395 return bind; |
532 template: r"Can't have both a type and 'var'.", | 396 } |
533 tip: r"Try removing 'var.'", | 397 |
534 dart2jsCode: "EXTRANEOUS_MODIFIER", | 398 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
535 format: _formatTypeAfterVar); | 399 const BoundFastaCode codeFastaUsageShort = |
536 | 400 const BoundFastaCode("FastaUsageShort", |
537 typedef FastaMessage _TypeAfterVar(Uri uri, int charOffset); | 401 template: r"""Frequently used options: |
538 | 402 |
539 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 403 -o <file> Generate the output into <file>. |
540 FastaMessage _formatTypeAfterVar(Uri uri, int charOffset) { | 404 -h Display this message (add -v for information about all options).""")
; |
541 return new FastaMessage(uri, charOffset, codeTypeAfterVar, | 405 |
542 message: "Can't have both a type and 'var'.", | 406 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
543 tip: "Try removing 'var.'", | 407 const BoundFastaCode codeTypeAfterVar = const BoundFastaCode("TypeAfterVar", |
544 arguments: {}); | 408 template: r"""Can't have both a type and 'var'.""", |
545 } | 409 tip: r"""Try removing 'var.'""", |
546 | 410 dart2jsCode: "EXTRANEOUS_MODIFIER"); |
547 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 411 |
548 const FastaCode<_AbstractNotSync> codeAbstractNotSync = | 412 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
549 const FastaCode<_AbstractNotSync>("AbstractNotSync", | 413 const UnboundFastaCode<_AbstractClassInstantiation> |
550 template: r"Abstract methods can't use 'async', 'async*', or 'sync*'.", | 414 codeAbstractClassInstantiation = |
551 dart2jsCode: "FASTA_IGNORED", | 415 const UnboundFastaCode<_AbstractClassInstantiation>( |
552 format: _formatAbstractNotSync); | 416 "AbstractClassInstantiation", |
553 | 417 template: |
554 typedef FastaMessage _AbstractNotSync(Uri uri, int charOffset); | 418 r"""The class '#name' is abstract and can't be instantiated.""", |
555 | 419 bind: _bindAbstractClassInstantiation); |
556 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 420 |
557 FastaMessage _formatAbstractNotSync(Uri uri, int charOffset) { | 421 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
558 return new FastaMessage(uri, charOffset, codeAbstractNotSync, | 422 typedef _AbstractClassInstantiation = FastaMessage Function(Uri, int) Function( |
559 message: "Abstract methods can't use 'async', 'async*', or 'sync*'.", | 423 String name); |
560 arguments: {}); | 424 |
561 } | 425 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
562 | 426 FastaMessage Function(Uri, int) _bindAbstractClassInstantiation(String name) { |
563 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 427 FastaMessage bind(Uri uri, int charOffset) { |
564 const FastaCode<_ExpectedDeclaration> codeExpectedDeclaration = | 428 return new FastaMessage(uri, charOffset, codeAbstractClassInstantiation, |
565 const FastaCode<_ExpectedDeclaration>("ExpectedDeclaration", | 429 message: """The class '$name' is abstract and can't be instantiated.""", |
566 template: r"Expected a declaration, but got '#lexeme'.", | 430 arguments: {'name': name}); |
| 431 } |
| 432 |
| 433 return bind; |
| 434 } |
| 435 |
| 436 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 437 const BoundFastaCode codeAbstractNotSync = const BoundFastaCode( |
| 438 "AbstractNotSync", |
| 439 template: r"""Abstract methods can't use 'async', 'async*', or 'sync*'.""", |
| 440 dart2jsCode: "FASTA_IGNORED"); |
| 441 |
| 442 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 443 const UnboundFastaCode<_GetterNotFound> codeGetterNotFound = |
| 444 const UnboundFastaCode<_GetterNotFound>("GetterNotFound", |
| 445 template: r"""Getter not found: '#name'.""", bind: _bindGetterNotFound); |
| 446 |
| 447 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 448 typedef _GetterNotFound = FastaMessage Function(Uri, int) Function(String name); |
| 449 |
| 450 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 451 FastaMessage Function(Uri, int) _bindGetterNotFound(String name) { |
| 452 FastaMessage bind(Uri uri, int charOffset) { |
| 453 return new FastaMessage(uri, charOffset, codeGetterNotFound, |
| 454 message: """Getter not found: '$name'.""", arguments: {'name': name}); |
| 455 } |
| 456 |
| 457 return bind; |
| 458 } |
| 459 |
| 460 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 461 const BoundFastaCode codeListLiteralTooManyTypeArguments = const BoundFastaCode( |
| 462 "ListLiteralTooManyTypeArguments", |
| 463 template: r"""Too many type arguments on List literal."""); |
| 464 |
| 465 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 466 const UnboundFastaCode<_ExpectedDeclaration> codeExpectedDeclaration = |
| 467 const UnboundFastaCode<_ExpectedDeclaration>("ExpectedDeclaration", |
| 468 template: r"""Expected a declaration, but got '#lexeme'.""", |
567 dart2jsCode: "FASTA_FATAL", | 469 dart2jsCode: "FASTA_FATAL", |
568 format: _formatExpectedDeclaration); | 470 bind: _bindExpectedDeclaration); |
569 | 471 |
570 typedef FastaMessage _ExpectedDeclaration(Uri uri, int charOffset, Token token); | 472 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
571 | 473 typedef _ExpectedDeclaration = FastaMessage Function(Uri, int) Function( |
572 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 474 Token token); |
573 FastaMessage _formatExpectedDeclaration(Uri uri, int charOffset, Token token) { | 475 |
574 String lexeme = token.lexeme; | 476 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
575 return new FastaMessage(uri, charOffset, codeExpectedDeclaration, | 477 FastaMessage Function(Uri, int) _bindExpectedDeclaration(Token token) { |
576 message: "Expected a declaration, but got '$lexeme'.", | 478 FastaMessage bind(Uri uri, int charOffset) { |
577 arguments: {'token': token}); | 479 String lexeme = token.lexeme; |
578 } | 480 return new FastaMessage(uri, charOffset, codeExpectedDeclaration, |
579 | 481 message: """Expected a declaration, but got '$lexeme'.""", |
580 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 482 arguments: {'token': token}); |
581 const FastaCode< | 483 } |
582 _AsciiControlCharacter> codeAsciiControlCharacter = const FastaCode< | 484 |
| 485 return bind; |
| 486 } |
| 487 |
| 488 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 489 const UnboundFastaCode<_ConstructorNotFound> codeConstructorNotFound = |
| 490 const UnboundFastaCode<_ConstructorNotFound>("ConstructorNotFound", |
| 491 template: r"""Couldn't find constructor '#name'.""", |
| 492 bind: _bindConstructorNotFound); |
| 493 |
| 494 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 495 typedef _ConstructorNotFound = FastaMessage Function(Uri, int) Function( |
| 496 String name); |
| 497 |
| 498 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 499 FastaMessage Function(Uri, int) _bindConstructorNotFound(String name) { |
| 500 FastaMessage bind(Uri uri, int charOffset) { |
| 501 return new FastaMessage(uri, charOffset, codeConstructorNotFound, |
| 502 message: """Couldn't find constructor '$name'.""", |
| 503 arguments: {'name': name}); |
| 504 } |
| 505 |
| 506 return bind; |
| 507 } |
| 508 |
| 509 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 510 const UnboundFastaCode< |
| 511 _AsciiControlCharacter> codeAsciiControlCharacter = const UnboundFastaCode< |
583 _AsciiControlCharacter>("AsciiControlCharacter", | 512 _AsciiControlCharacter>("AsciiControlCharacter", |
584 template: | 513 template: |
585 r"The control character #unicode can only be used in strings and comment
s.", | 514 r"""The control character #unicode can only be used in strings and comme
nts.""", |
586 dart2jsCode: "BAD_INPUT_CHARACTER", | 515 dart2jsCode: "BAD_INPUT_CHARACTER", |
587 format: _formatAsciiControlCharacter); | 516 bind: _bindAsciiControlCharacter); |
588 | 517 |
589 typedef FastaMessage _AsciiControlCharacter( | 518 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
590 Uri uri, int charOffset, int codePoint); | 519 typedef _AsciiControlCharacter = FastaMessage Function(Uri, int) Function( |
591 | 520 int codePoint); |
592 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 521 |
593 FastaMessage _formatAsciiControlCharacter( | 522 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
594 Uri uri, int charOffset, int codePoint) { | 523 FastaMessage Function(Uri, int) _bindAsciiControlCharacter(int codePoint) { |
595 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; | 524 FastaMessage bind(Uri uri, int charOffset) { |
596 return new FastaMessage(uri, charOffset, codeAsciiControlCharacter, | 525 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; |
597 message: | 526 return new FastaMessage(uri, charOffset, codeAsciiControlCharacter, |
598 "The control character $unicode can only be used in strings and commen
ts.", | 527 message: |
599 arguments: {'codePoint': codePoint}); | 528 """The control character $unicode can only be used in strings and co
mments.""", |
600 } | 529 arguments: {'codePoint': codePoint}); |
601 | 530 } |
602 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 531 |
603 const FastaCode<_UnmatchedToken> codeUnmatchedToken = | 532 return bind; |
604 const FastaCode<_UnmatchedToken>("UnmatchedToken", | 533 } |
605 template: r"Can't find '#string' to match '#lexeme'.", | 534 |
| 535 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 536 const UnboundFastaCode<_UnmatchedToken> codeUnmatchedToken = |
| 537 const UnboundFastaCode<_UnmatchedToken>("UnmatchedToken", |
| 538 template: r"""Can't find '#string' to match '#lexeme'.""", |
606 dart2jsCode: "UNMATCHED_TOKEN", | 539 dart2jsCode: "UNMATCHED_TOKEN", |
607 format: _formatUnmatchedToken); | 540 bind: _bindUnmatchedToken); |
608 | 541 |
609 typedef FastaMessage _UnmatchedToken( | 542 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
610 Uri uri, int charOffset, String string, Token token); | 543 typedef _UnmatchedToken = FastaMessage Function(Uri, int) Function( |
611 | 544 String string, Token token); |
612 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 545 |
613 FastaMessage _formatUnmatchedToken( | 546 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
614 Uri uri, int charOffset, String string, Token token) { | 547 FastaMessage Function(Uri, int) _bindUnmatchedToken( |
615 String lexeme = token.lexeme; | 548 String string, Token token) { |
616 return new FastaMessage(uri, charOffset, codeUnmatchedToken, | 549 FastaMessage bind(Uri uri, int charOffset) { |
617 message: "Can't find '$string' to match '$lexeme'.", | 550 String lexeme = token.lexeme; |
618 arguments: {'string': string, 'token': token}); | 551 return new FastaMessage(uri, charOffset, codeUnmatchedToken, |
619 } | 552 message: """Can't find '$string' to match '$lexeme'.""", |
620 | 553 arguments: {'string': string, 'token': token}); |
621 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 554 } |
622 const FastaCode<_InvalidSyncModifier> codeInvalidSyncModifier = | 555 |
623 const FastaCode<_InvalidSyncModifier>("InvalidSyncModifier", | 556 return bind; |
624 template: r"Invalid modifier 'sync'.", | 557 } |
625 tip: r"Try replacing 'sync' with 'sync*'.", | 558 |
626 dart2jsCode: "INVALID_SYNC_MODIFIER", | 559 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
627 format: _formatInvalidSyncModifier); | 560 const BoundFastaCode codeInvalidSyncModifier = const BoundFastaCode( |
628 | 561 "InvalidSyncModifier", |
629 typedef FastaMessage _InvalidSyncModifier(Uri uri, int charOffset); | 562 template: r"""Invalid modifier 'sync'.""", |
630 | 563 tip: r"""Try replacing 'sync' with 'sync*'.""", |
631 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 564 dart2jsCode: "INVALID_SYNC_MODIFIER"); |
632 FastaMessage _formatInvalidSyncModifier(Uri uri, int charOffset) { | 565 |
633 return new FastaMessage(uri, charOffset, codeInvalidSyncModifier, | 566 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
634 message: "Invalid modifier 'sync'.", | 567 const UnboundFastaCode<_FastaCLIArgumentRequired> codeFastaCLIArgumentRequired = |
635 tip: "Try replacing 'sync' with 'sync*'.", | 568 const UnboundFastaCode<_FastaCLIArgumentRequired>( |
636 arguments: {}); | 569 "FastaCLIArgumentRequired", |
637 } | 570 template: r"""Expected value after '#name'.""", |
638 | 571 bind: _bindFastaCLIArgumentRequired); |
639 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 572 |
640 const FastaCode<_GetterWithFormals> codeGetterWithFormals = | 573 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
641 const FastaCode<_GetterWithFormals>("GetterWithFormals", | 574 typedef _FastaCLIArgumentRequired = FastaMessage Function(Uri, int) Function( |
642 template: r"A getter can't have formal parameters.", | 575 String name); |
643 tip: r"Try removing '(...)'.", | 576 |
644 dart2jsCode: "FASTA_IGNORED", | 577 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
645 format: _formatGetterWithFormals); | 578 FastaMessage Function(Uri, int) _bindFastaCLIArgumentRequired(String name) { |
646 | 579 FastaMessage bind(Uri uri, int charOffset) { |
647 typedef FastaMessage _GetterWithFormals(Uri uri, int charOffset); | 580 return new FastaMessage(uri, charOffset, codeFastaCLIArgumentRequired, |
648 | 581 message: """Expected value after '$name'.""", |
649 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 582 arguments: {'name': name}); |
650 FastaMessage _formatGetterWithFormals(Uri uri, int charOffset) { | 583 } |
651 return new FastaMessage(uri, charOffset, codeGetterWithFormals, | 584 |
652 message: "A getter can't have formal parameters.", | 585 return bind; |
653 tip: "Try removing '(...)'.", | 586 } |
654 arguments: {}); | 587 |
655 } | 588 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
656 | 589 const BoundFastaCode codeGetterWithFormals = const BoundFastaCode( |
657 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 590 "GetterWithFormals", |
658 const FastaCode<_NoFormals> codeNoFormals = const FastaCode<_NoFormals>( | 591 template: r"""A getter can't have formal parameters.""", |
659 "NoFormals", | 592 tip: r"""Try removing '(...)'.""", |
660 template: r"A function should have formal parameters.", | 593 dart2jsCode: "FASTA_IGNORED"); |
| 594 |
| 595 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 596 const UnboundFastaCode<_NoFormals> codeNoFormals = const UnboundFastaCode< |
| 597 _NoFormals>("NoFormals", |
| 598 template: r"""A function should have formal parameters.""", |
661 tip: | 599 tip: |
662 r"Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to decl
are a getter.", | 600 r"""Try adding '()' after '#lexeme', or add 'get' before '#lexeme' to de
clare a getter.""", |
663 dart2jsCode: "FASTA_IGNORED", | 601 dart2jsCode: "FASTA_IGNORED", |
664 format: _formatNoFormals); | 602 bind: _bindNoFormals); |
665 | 603 |
666 typedef FastaMessage _NoFormals(Uri uri, int charOffset, Token token); | 604 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
667 | 605 typedef _NoFormals = FastaMessage Function(Uri, int) Function(Token token); |
668 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 606 |
669 FastaMessage _formatNoFormals(Uri uri, int charOffset, Token token) { | 607 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
670 String lexeme = token.lexeme; | 608 FastaMessage Function(Uri, int) _bindNoFormals(Token token) { |
671 return new FastaMessage(uri, charOffset, codeNoFormals, | 609 FastaMessage bind(Uri uri, int charOffset) { |
672 message: "A function should have formal parameters.", | 610 String lexeme = token.lexeme; |
673 tip: | 611 return new FastaMessage(uri, charOffset, codeNoFormals, |
674 "Try adding '()' after '$lexeme', or add 'get' before '$lexeme' to dec
lare a getter.", | 612 message: """A function should have formal parameters.""", |
675 arguments: {'token': token}); | 613 tip: |
676 } | 614 """Try adding '()' after '$lexeme', or add 'get' before '$lexeme' to
declare a getter.""", |
677 | 615 arguments: {'token': token}); |
678 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 616 } |
679 const FastaCode<_ExpectedOpenParens> codeExpectedOpenParens = | 617 |
680 const FastaCode<_ExpectedOpenParens>("ExpectedOpenParens", | 618 return bind; |
681 template: r"Expected '('.", | 619 } |
682 dart2jsCode: "GENERIC", | 620 |
683 format: _formatExpectedOpenParens); | 621 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
684 | 622 const BoundFastaCode codeExpectedOpenParens = const BoundFastaCode( |
685 typedef FastaMessage _ExpectedOpenParens(Uri uri, int charOffset); | 623 "ExpectedOpenParens", |
686 | 624 template: r"""Expected '('.""", |
687 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 625 dart2jsCode: "GENERIC"); |
688 FastaMessage _formatExpectedOpenParens(Uri uri, int charOffset) { | 626 |
689 return new FastaMessage(uri, charOffset, codeExpectedOpenParens, | 627 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
690 message: "Expected '('.", arguments: {}); | 628 const BoundFastaCode codeUnterminatedComment = const BoundFastaCode( |
691 } | 629 "UnterminatedComment", |
692 | 630 template: r"""Comment starting with '/*' must end with '*/'.""", |
693 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 631 analyzerCode: "UNTERMINATED_MULTI_LINE_COMMENT", |
694 const FastaCode<_UnterminatedComment> codeUnterminatedComment = | 632 dart2jsCode: "UNTERMINATED_COMMENT"); |
695 const FastaCode<_UnterminatedComment>("UnterminatedComment", | 633 |
696 template: r"Comment starting with '/*' must end with '*/'.", | 634 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
697 analyzerCode: "UNTERMINATED_MULTI_LINE_COMMENT", | 635 const BoundFastaCode codeCatchSyntax = const BoundFastaCode("CatchSyntax", |
698 dart2jsCode: "UNTERMINATED_COMMENT", | 636 template: |
699 format: _formatUnterminatedComment); | 637 r"""'catch' must be followed by '(identifier)' or '(identifier, identifi
er)'.""", |
700 | |
701 typedef FastaMessage _UnterminatedComment(Uri uri, int charOffset); | |
702 | |
703 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
704 FastaMessage _formatUnterminatedComment(Uri uri, int charOffset) { | |
705 return new FastaMessage(uri, charOffset, codeUnterminatedComment, | |
706 message: "Comment starting with '/*' must end with '*/'.", arguments: {}); | |
707 } | |
708 | |
709 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
710 const FastaCode<_CatchSyntax> codeCatchSyntax = const FastaCode<_CatchSyntax>( | |
711 "CatchSyntax", | |
712 template: | |
713 r"'catch' must be followed by '(identifier)' or '(identifier, identifier
)'.", | |
714 tip: | 638 tip: |
715 r"No types are needed, the first is given by 'on', the second is always
'StackTrace'.", | 639 r"""No types are needed, the first is given by 'on', the second is alway
s 'StackTrace'.""", |
716 dart2jsCode: "FASTA_IGNORED", | 640 dart2jsCode: "FASTA_IGNORED"); |
717 format: _formatCatchSyntax); | 641 |
718 | 642 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
719 typedef FastaMessage _CatchSyntax(Uri uri, int charOffset); | 643 const UnboundFastaCode<_ExpectedClassBody> codeExpectedClassBody = |
720 | 644 const UnboundFastaCode<_ExpectedClassBody>("ExpectedClassBody", |
721 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 645 template: r"""Expected a class body, but got '#lexeme'.""", |
722 FastaMessage _formatCatchSyntax(Uri uri, int charOffset) { | |
723 return new FastaMessage(uri, charOffset, codeCatchSyntax, | |
724 message: | |
725 "'catch' must be followed by '(identifier)' or '(identifier, identifie
r)'.", | |
726 tip: | |
727 "No types are needed, the first is given by 'on', the second is always
'StackTrace'.", | |
728 arguments: {}); | |
729 } | |
730 | |
731 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
732 const FastaCode<_ExpectedClassBody> codeExpectedClassBody = | |
733 const FastaCode<_ExpectedClassBody>("ExpectedClassBody", | |
734 template: r"Expected a class body, but got '#lexeme'.", | |
735 dart2jsCode: "FASTA_FATAL", | 646 dart2jsCode: "FASTA_FATAL", |
736 format: _formatExpectedClassBody); | 647 bind: _bindExpectedClassBody); |
737 | 648 |
738 typedef FastaMessage _ExpectedClassBody(Uri uri, int charOffset, Token token); | 649 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
739 | 650 typedef _ExpectedClassBody = FastaMessage Function(Uri, int) Function( |
740 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 651 Token token); |
741 FastaMessage _formatExpectedClassBody(Uri uri, int charOffset, Token token) { | 652 |
742 String lexeme = token.lexeme; | 653 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
743 return new FastaMessage(uri, charOffset, codeExpectedClassBody, | 654 FastaMessage Function(Uri, int) _bindExpectedClassBody(Token token) { |
744 message: "Expected a class body, but got '$lexeme'.", | 655 FastaMessage bind(Uri uri, int charOffset) { |
745 arguments: {'token': token}); | 656 String lexeme = token.lexeme; |
746 } | 657 return new FastaMessage(uri, charOffset, codeExpectedClassBody, |
747 | 658 message: """Expected a class body, but got '$lexeme'.""", |
748 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 659 arguments: {'token': token}); |
749 const FastaCode<_ExpectedExpression> codeExpectedExpression = | 660 } |
750 const FastaCode<_ExpectedExpression>("ExpectedExpression", | 661 |
751 template: r"Expected an expression, but got '#lexeme'.", | 662 return bind; |
| 663 } |
| 664 |
| 665 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 666 const UnboundFastaCode<_NotAType> codeNotAType = |
| 667 const UnboundFastaCode<_NotAType>("NotAType", |
| 668 template: r"""'#name' isn't a type.""", bind: _bindNotAType); |
| 669 |
| 670 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 671 typedef _NotAType = FastaMessage Function(Uri, int) Function(String name); |
| 672 |
| 673 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 674 FastaMessage Function(Uri, int) _bindNotAType(String name) { |
| 675 FastaMessage bind(Uri uri, int charOffset) { |
| 676 return new FastaMessage(uri, charOffset, codeNotAType, |
| 677 message: """'$name' isn't a type.""", arguments: {'name': name}); |
| 678 } |
| 679 |
| 680 return bind; |
| 681 } |
| 682 |
| 683 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 684 const UnboundFastaCode<_ExpectedExpression> codeExpectedExpression = |
| 685 const UnboundFastaCode<_ExpectedExpression>("ExpectedExpression", |
| 686 template: r"""Expected an expression, but got '#lexeme'.""", |
752 dart2jsCode: "FASTA_FATAL", | 687 dart2jsCode: "FASTA_FATAL", |
753 format: _formatExpectedExpression); | 688 bind: _bindExpectedExpression); |
754 | 689 |
755 typedef FastaMessage _ExpectedExpression(Uri uri, int charOffset, Token token); | 690 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
756 | 691 typedef _ExpectedExpression = FastaMessage Function(Uri, int) Function( |
757 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 692 Token token); |
758 FastaMessage _formatExpectedExpression(Uri uri, int charOffset, Token token) { | 693 |
759 String lexeme = token.lexeme; | 694 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
760 return new FastaMessage(uri, charOffset, codeExpectedExpression, | 695 FastaMessage Function(Uri, int) _bindExpectedExpression(Token token) { |
761 message: "Expected an expression, but got '$lexeme'.", | 696 FastaMessage bind(Uri uri, int charOffset) { |
762 arguments: {'token': token}); | 697 String lexeme = token.lexeme; |
763 } | 698 return new FastaMessage(uri, charOffset, codeExpectedExpression, |
764 | 699 message: """Expected an expression, but got '$lexeme'.""", |
765 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 700 arguments: {'token': token}); |
766 const FastaCode<_InvalidAwaitFor> codeInvalidAwaitFor = const FastaCode< | 701 } |
767 _InvalidAwaitFor>("InvalidAwaitFor", | 702 |
768 template: | 703 return bind; |
769 r"'await' is only supported in methods with an 'async' or 'async*' body
modifier.", | 704 } |
| 705 |
| 706 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 707 const BoundFastaCode codeInvalidAwaitFor = const BoundFastaCode( |
| 708 "InvalidAwaitFor", |
| 709 template: |
| 710 r"""'await' is only supported in methods with an 'async' or 'async*' bod
y modifier.""", |
770 tip: | 711 tip: |
771 r"Try adding 'async' or 'async*' to the method body or removing the 'awa
it' keyword.", | 712 r"""Try adding 'async' or 'async*' to the method body or removing the 'a
wait' keyword.""", |
772 dart2jsCode: "INVALID_AWAIT_FOR", | 713 dart2jsCode: "INVALID_AWAIT_FOR"); |
773 format: _formatInvalidAwaitFor); | 714 |
774 | 715 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
775 typedef FastaMessage _InvalidAwaitFor(Uri uri, int charOffset); | 716 const UnboundFastaCode<_ExpectedType> codeExpectedType = |
776 | 717 const UnboundFastaCode<_ExpectedType>("ExpectedType", |
777 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 718 template: r"""Expected a type, but got '#lexeme'.""", |
778 FastaMessage _formatInvalidAwaitFor(Uri uri, int charOffset) { | |
779 return new FastaMessage(uri, charOffset, codeInvalidAwaitFor, | |
780 message: | |
781 "'await' is only supported in methods with an 'async' or 'async*' body
modifier.", | |
782 tip: | |
783 "Try adding 'async' or 'async*' to the method body or removing the 'aw
ait' keyword.", | |
784 arguments: {}); | |
785 } | |
786 | |
787 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
788 const FastaCode<_ExpectedType> codeExpectedType = | |
789 const FastaCode<_ExpectedType>("ExpectedType", | |
790 template: r"Expected a type, but got '#lexeme'.", | |
791 dart2jsCode: "FASTA_FATAL", | 719 dart2jsCode: "FASTA_FATAL", |
792 format: _formatExpectedType); | 720 bind: _bindExpectedType); |
793 | 721 |
794 typedef FastaMessage _ExpectedType(Uri uri, int charOffset, Token token); | 722 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
795 | 723 typedef _ExpectedType = FastaMessage Function(Uri, int) Function(Token token); |
796 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 724 |
797 FastaMessage _formatExpectedType(Uri uri, int charOffset, Token token) { | 725 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
798 String lexeme = token.lexeme; | 726 FastaMessage Function(Uri, int) _bindExpectedType(Token token) { |
799 return new FastaMessage(uri, charOffset, codeExpectedType, | 727 FastaMessage bind(Uri uri, int charOffset) { |
800 message: "Expected a type, but got '$lexeme'.", | 728 String lexeme = token.lexeme; |
801 arguments: {'token': token}); | 729 return new FastaMessage(uri, charOffset, codeExpectedType, |
802 } | 730 message: """Expected a type, but got '$lexeme'.""", |
803 | 731 arguments: {'token': token}); |
804 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 732 } |
805 const FastaCode<_UnterminatedToken> codeUnterminatedToken = | 733 |
806 const FastaCode<_UnterminatedToken>("UnterminatedToken", | 734 return bind; |
807 template: r"Incomplete token.", | 735 } |
808 dart2jsCode: "UNTERMINATED_TOKEN", | 736 |
809 format: _formatUnterminatedToken); | 737 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
810 | 738 const BoundFastaCode codeUnterminatedToken = const BoundFastaCode( |
811 typedef FastaMessage _UnterminatedToken(Uri uri, int charOffset); | 739 "UnterminatedToken", |
812 | 740 template: r"""Incomplete token.""", |
813 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 741 dart2jsCode: "UNTERMINATED_TOKEN"); |
814 FastaMessage _formatUnterminatedToken(Uri uri, int charOffset) { | 742 |
815 return new FastaMessage(uri, charOffset, codeUnterminatedToken, | 743 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
816 message: "Incomplete token.", arguments: {}); | 744 const UnboundFastaCode<_SetterNotFound> codeSetterNotFound = |
817 } | 745 const UnboundFastaCode<_SetterNotFound>("SetterNotFound", |
818 | 746 template: r"""Setter not found: '#name'.""", bind: _bindSetterNotFound); |
819 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 747 |
820 const FastaCode<_ExpectedButGot> codeExpectedButGot = | 748 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
821 const FastaCode<_ExpectedButGot>("ExpectedButGot", | 749 typedef _SetterNotFound = FastaMessage Function(Uri, int) Function(String name); |
822 template: r"Expected '#string' before this.", | 750 |
823 tip: r"DONT_KNOW_HOW_TO_FIX,", | 751 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 752 FastaMessage Function(Uri, int) _bindSetterNotFound(String name) { |
| 753 FastaMessage bind(Uri uri, int charOffset) { |
| 754 return new FastaMessage(uri, charOffset, codeSetterNotFound, |
| 755 message: """Setter not found: '$name'.""", arguments: {'name': name}); |
| 756 } |
| 757 |
| 758 return bind; |
| 759 } |
| 760 |
| 761 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 762 const UnboundFastaCode<_ExpectedButGot> codeExpectedButGot = |
| 763 const UnboundFastaCode<_ExpectedButGot>("ExpectedButGot", |
| 764 template: r"""Expected '#string' before this.""", |
| 765 tip: r"""DONT_KNOW_HOW_TO_FIX,""", |
824 dart2jsCode: "MISSING_TOKEN_BEFORE_THIS", | 766 dart2jsCode: "MISSING_TOKEN_BEFORE_THIS", |
825 format: _formatExpectedButGot); | 767 bind: _bindExpectedButGot); |
826 | 768 |
827 typedef FastaMessage _ExpectedButGot(Uri uri, int charOffset, String string); | 769 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
828 | 770 typedef _ExpectedButGot = FastaMessage Function(Uri, int) Function( |
829 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 771 String string); |
830 FastaMessage _formatExpectedButGot(Uri uri, int charOffset, String string) { | 772 |
831 return new FastaMessage(uri, charOffset, codeExpectedButGot, | 773 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
832 message: "Expected '$string' before this.", | 774 FastaMessage Function(Uri, int) _bindExpectedButGot(String string) { |
833 tip: "DONT_KNOW_HOW_TO_FIX,", | 775 FastaMessage bind(Uri uri, int charOffset) { |
834 arguments: {'string': string}); | 776 return new FastaMessage(uri, charOffset, codeExpectedButGot, |
835 } | 777 message: """Expected '$string' before this.""", |
836 | 778 tip: """DONT_KNOW_HOW_TO_FIX,""", |
837 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 779 arguments: {'string': string}); |
838 const FastaCode<_ConstFieldWithoutInitializer> | 780 } |
839 codeConstFieldWithoutInitializer = | 781 |
840 const FastaCode<_ConstFieldWithoutInitializer>( | 782 return bind; |
841 "ConstFieldWithoutInitializer", | 783 } |
842 template: r"A 'const' field must be initialized.", | 784 |
843 tip: r"Try adding '= <initializer>'.", | 785 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
844 dart2jsCode: "FASTA_IGNORED", | 786 const BoundFastaCode codeConstFieldWithoutInitializer = const BoundFastaCode( |
845 format: _formatConstFieldWithoutInitializer); | 787 "ConstFieldWithoutInitializer", |
846 | 788 template: r"""A 'const' field must be initialized.""", |
847 typedef FastaMessage _ConstFieldWithoutInitializer(Uri uri, int charOffset); | 789 tip: r"""Try adding '= <initializer>'.""", |
848 | 790 dart2jsCode: "FASTA_IGNORED"); |
849 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 791 |
850 FastaMessage _formatConstFieldWithoutInitializer(Uri uri, int charOffset) { | 792 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
851 return new FastaMessage(uri, charOffset, codeConstFieldWithoutInitializer, | 793 const BoundFastaCode codeFastaUsageLong = const BoundFastaCode("FastaUsageLong", |
852 message: "A 'const' field must be initialized.", | 794 template: r"""Supported options: |
853 tip: "Try adding '= <initializer>'.", | 795 |
854 arguments: {}); | 796 -o <file>, --output=<file> |
855 } | 797 Generate the output into <file>. |
856 | 798 |
857 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 799 -h, /h, /?, --help |
858 const FastaCode<_AwaitForNotAsync> codeAwaitForNotAsync = const FastaCode< | 800 Display this message (add -v for information about all options). |
859 _AwaitForNotAsync>("AwaitForNotAsync", | 801 |
860 template: | 802 -v, --verbose |
861 r"Asynchronous for-loop can only be used in 'async' or 'async*' methods.
", | 803 Display verbose information. |
862 dart2jsCode: "FASTA_IGNORED", | 804 |
863 format: _formatAwaitForNotAsync); | 805 -- |
864 | 806 Stop option parsing, the rest of the command line is assumed to be |
865 typedef FastaMessage _AwaitForNotAsync(Uri uri, int charOffset); | 807 file names or arguments to the Dart program. |
866 | 808 |
867 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 809 --packages=<file> |
868 FastaMessage _formatAwaitForNotAsync(Uri uri, int charOffset) { | 810 Use package resolution configuration <file>, which should contain a mapping |
869 return new FastaMessage(uri, charOffset, codeAwaitForNotAsync, | 811 of package names to paths. |
870 message: | 812 |
871 "Asynchronous for-loop can only be used in 'async' or 'async*' methods
.", | 813 --platform=<file> |
872 arguments: {}); | 814 Read the SDK platform from <file>, which should be in Dill/Kernel IR format |
873 } | 815 and contain the Dart SDK. |
874 | 816 |
875 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 817 --verify |
876 const FastaCode<_Encoding> codeEncoding = const FastaCode<_Encoding>("Encoding", | 818 Check that the generated output is free of various problems. This is mostly |
877 template: r"Unable to decode bytes as UTF-8.", | 819 useful for developers of this compiler or Kernel transformations. |
878 dart2jsCode: "FASTA_FATAL", | 820 |
879 format: _formatEncoding); | 821 --dump-ir |
880 | 822 Print compiled libraries in Kernel source notation. |
881 typedef FastaMessage _Encoding(Uri uri, int charOffset); | 823 |
882 | 824 --exclude-source |
883 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 825 Do not include source code in the dill file. |
884 FastaMessage _formatEncoding(Uri uri, int charOffset) { | 826 |
885 return new FastaMessage(uri, charOffset, codeEncoding, | 827 --compile-sdk=<patched_sdk> |
886 message: "Unable to decode bytes as UTF-8.", arguments: {}); | 828 Compile the SDK from scratch instead of reading it from 'platform.dill'. |
887 } | 829 |
888 | 830 --fatal=errors |
889 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 831 --fatal=warnings |
890 const FastaCode<_AsyncAsIdentifier> codeAsyncAsIdentifier = const FastaCode< | 832 --fatal=nits |
891 _AsyncAsIdentifier>("AsyncAsIdentifier", | 833 Makes messages of the given kinds fatal, that is, immediately stop the |
892 template: | 834 compiler with a non-zero exit-code. In --verbose mode, also display an |
893 r"'async' can't be used as an identifier in 'async', 'async*', or 'sync*
' methods.", | 835 internal stack trace from the compiler. Multiple kinds can be separated by |
| 836 commas, for example, --fatal=errors,warnings."""); |
| 837 |
| 838 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 839 const BoundFastaCode codeAwaitForNotAsync = const BoundFastaCode( |
| 840 "AwaitForNotAsync", |
| 841 template: |
| 842 r"""Asynchronous for-loop can only be used in 'async' or 'async*' method
s.""", |
| 843 dart2jsCode: "FASTA_IGNORED"); |
| 844 |
| 845 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 846 const BoundFastaCode codeEncoding = const BoundFastaCode("Encoding", |
| 847 template: r"""Unable to decode bytes as UTF-8.""", |
| 848 dart2jsCode: "FASTA_FATAL"); |
| 849 |
| 850 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 851 const BoundFastaCode codeAsyncAsIdentifier = const BoundFastaCode( |
| 852 "AsyncAsIdentifier", |
| 853 template: |
| 854 r"""'async' can't be used as an identifier in 'async', 'async*', or 'syn
c*' methods.""", |
894 analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER", | 855 analyzerCode: "ASYNC_KEYWORD_USED_AS_IDENTIFIER", |
895 dart2jsCode: "GENERIC", | 856 dart2jsCode: "GENERIC"); |
896 format: _formatAsyncAsIdentifier); | 857 |
897 | 858 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
898 typedef FastaMessage _AsyncAsIdentifier(Uri uri, int charOffset); | 859 const BoundFastaCode codeYieldAsIdentifier = const BoundFastaCode( |
899 | 860 "YieldAsIdentifier", |
900 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 861 template: |
901 FastaMessage _formatAsyncAsIdentifier(Uri uri, int charOffset) { | 862 r"""'yield' can't be used as an identifier in 'async', 'async*', or 'syn
c*' methods.""", |
902 return new FastaMessage(uri, charOffset, codeAsyncAsIdentifier, | 863 dart2jsCode: "FASTA_IGNORED"); |
903 message: | 864 |
904 "'async' can't be used as an identifier in 'async', 'async*', or 'sync
*' methods.", | 865 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
905 arguments: {}); | 866 const BoundFastaCode codeAssertAsExpression = const BoundFastaCode( |
906 } | 867 "AssertAsExpression", |
907 | 868 template: r"""`assert` can't be used as an expression.""", |
908 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 869 dart2jsCode: "FASTA_FATAL"); |
909 const FastaCode<_YieldAsIdentifier> codeYieldAsIdentifier = const FastaCode< | 870 |
910 _YieldAsIdentifier>("YieldAsIdentifier", | 871 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
911 template: | 872 const BoundFastaCode codeOnlyTry = const BoundFastaCode("OnlyTry", |
912 r"'yield' can't be used as an identifier in 'async', 'async*', or 'sync*
' methods.", | 873 template: |
913 dart2jsCode: "FASTA_IGNORED", | 874 r"""Try block should be followed by 'on', 'catch', or 'finally' block.""
", |
914 format: _formatYieldAsIdentifier); | 875 tip: r"""Did you forget to add a 'finally' block?""", |
915 | 876 dart2jsCode: "FASTA_IGNORED"); |
916 typedef FastaMessage _YieldAsIdentifier(Uri uri, int charOffset); | 877 |
917 | 878 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
918 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 879 const BoundFastaCode codeInvalidInlineFunctionType = const BoundFastaCode( |
919 FastaMessage _formatYieldAsIdentifier(Uri uri, int charOffset) { | 880 "InvalidInlineFunctionType", |
920 return new FastaMessage(uri, charOffset, codeYieldAsIdentifier, | 881 template: r"""Invalid inline function type.""", |
921 message: | |
922 "'yield' can't be used as an identifier in 'async', 'async*', or 'sync
*' methods.", | |
923 arguments: {}); | |
924 } | |
925 | |
926 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
927 const FastaCode<_AssertAsExpression> codeAssertAsExpression = | |
928 const FastaCode<_AssertAsExpression>("AssertAsExpression", | |
929 template: r"`assert` can't be used as an expression.", | |
930 dart2jsCode: "FASTA_FATAL", | |
931 format: _formatAssertAsExpression); | |
932 | |
933 typedef FastaMessage _AssertAsExpression(Uri uri, int charOffset); | |
934 | |
935 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
936 FastaMessage _formatAssertAsExpression(Uri uri, int charOffset) { | |
937 return new FastaMessage(uri, charOffset, codeAssertAsExpression, | |
938 message: "`assert` can't be used as an expression.", arguments: {}); | |
939 } | |
940 | |
941 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
942 const FastaCode<_OnlyTry> codeOnlyTry = const FastaCode<_OnlyTry>("OnlyTry", | |
943 template: | |
944 r"Try block should be followed by 'on', 'catch', or 'finally' block.", | |
945 tip: r"Did you forget to add a 'finally' block?", | |
946 dart2jsCode: "FASTA_IGNORED", | |
947 format: _formatOnlyTry); | |
948 | |
949 typedef FastaMessage _OnlyTry(Uri uri, int charOffset); | |
950 | |
951 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
952 FastaMessage _formatOnlyTry(Uri uri, int charOffset) { | |
953 return new FastaMessage(uri, charOffset, codeOnlyTry, | |
954 message: | |
955 "Try block should be followed by 'on', 'catch', or 'finally' block.", | |
956 tip: "Did you forget to add a 'finally' block?", | |
957 arguments: {}); | |
958 } | |
959 | |
960 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
961 const FastaCode< | |
962 _InvalidInlineFunctionType> codeInvalidInlineFunctionType = const FastaCode< | |
963 _InvalidInlineFunctionType>("InvalidInlineFunctionType", | |
964 template: r"Invalid inline function type.", | |
965 tip: | 882 tip: |
966 r"Try changing the inline function type (as in 'int f()') to a prefixed
function type using the `Function` keyword (as in 'int Function() f').", | 883 r"""Try changing the inline function type (as in 'int f()') to a prefixe
d function type using the `Function` keyword (as in 'int Function() f').""", |
967 dart2jsCode: "INVALID_INLINE_FUNCTION_TYPE", | 884 dart2jsCode: "INVALID_INLINE_FUNCTION_TYPE"); |
968 format: _formatInvalidInlineFunctionType); | 885 |
969 | 886 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
970 typedef FastaMessage _InvalidInlineFunctionType(Uri uri, int charOffset); | 887 const BoundFastaCode codeMetadataTypeArguments = const BoundFastaCode( |
971 | 888 "MetadataTypeArguments", |
972 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 889 template: r"""An annotation (metadata) can't use type arguments.""", |
973 FastaMessage _formatInvalidInlineFunctionType(Uri uri, int charOffset) { | 890 dart2jsCode: "FASTA_IGNORED"); |
974 return new FastaMessage(uri, charOffset, codeInvalidInlineFunctionType, | 891 |
975 message: "Invalid inline function type.", | 892 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
976 tip: | 893 const BoundFastaCode codeExpectedBody = const BoundFastaCode("ExpectedBody", |
977 "Try changing the inline function type (as in 'int f()') to a prefixed
function type using the `Function` keyword (as in 'int Function() f').", | 894 template: r"""Expected a function body or '=>'.""", |
978 arguments: {}); | 895 tip: r"""Try adding {}.""", |
979 } | 896 dart2jsCode: "BODY_EXPECTED"); |
980 | 897 |
981 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 898 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
982 const FastaCode<_MetadataTypeArguments> codeMetadataTypeArguments = | 899 const BoundFastaCode codeTypeRequired = const BoundFastaCode("TypeRequired", |
983 const FastaCode<_MetadataTypeArguments>("MetadataTypeArguments", | 900 template: r"""A type or modifier is required here.""", |
984 template: r"An annotation (metadata) can't use type arguments.", | 901 tip: r"""Try adding a type, 'var', 'const', or 'final'."""); |
985 dart2jsCode: "FASTA_IGNORED", | 902 |
986 format: _formatMetadataTypeArguments); | 903 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
987 | 904 const BoundFastaCode codeInvalidVoid = const BoundFastaCode("InvalidVoid", |
988 typedef FastaMessage _MetadataTypeArguments(Uri uri, int charOffset); | 905 template: |
989 | 906 r"""Type 'void' can't be used here because it isn't a return type.""", |
990 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
991 FastaMessage _formatMetadataTypeArguments(Uri uri, int charOffset) { | |
992 return new FastaMessage(uri, charOffset, codeMetadataTypeArguments, | |
993 message: "An annotation (metadata) can't use type arguments.", | |
994 arguments: {}); | |
995 } | |
996 | |
997 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
998 const FastaCode<_ExpectedBody> codeExpectedBody = | |
999 const FastaCode<_ExpectedBody>("ExpectedBody", | |
1000 template: r"Expected a function body or '=>'.", | |
1001 tip: r"Try adding {}.", | |
1002 dart2jsCode: "BODY_EXPECTED", | |
1003 format: _formatExpectedBody); | |
1004 | |
1005 typedef FastaMessage _ExpectedBody(Uri uri, int charOffset); | |
1006 | |
1007 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
1008 FastaMessage _formatExpectedBody(Uri uri, int charOffset) { | |
1009 return new FastaMessage(uri, charOffset, codeExpectedBody, | |
1010 message: "Expected a function body or '=>'.", | |
1011 tip: "Try adding {}.", | |
1012 arguments: {}); | |
1013 } | |
1014 | |
1015 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
1016 const FastaCode<_TypeRequired> codeTypeRequired = | |
1017 const FastaCode<_TypeRequired>("TypeRequired", | |
1018 template: r"A type or modifier is required here.", | |
1019 tip: r"Try adding a type, 'var', 'const', or 'final'.", | |
1020 format: _formatTypeRequired); | |
1021 | |
1022 typedef FastaMessage _TypeRequired(Uri uri, int charOffset); | |
1023 | |
1024 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
1025 FastaMessage _formatTypeRequired(Uri uri, int charOffset) { | |
1026 return new FastaMessage(uri, charOffset, codeTypeRequired, | |
1027 message: "A type or modifier is required here.", | |
1028 tip: "Try adding a type, 'var', 'const', or 'final'.", | |
1029 arguments: {}); | |
1030 } | |
1031 | |
1032 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
1033 const FastaCode<_InvalidVoid> codeInvalidVoid = const FastaCode<_InvalidVoid>( | |
1034 "InvalidVoid", | |
1035 template: r"Type 'void' can't be used here because it isn't a return type.", | |
1036 tip: | 907 tip: |
1037 r"Try removing 'void' keyword or replace it with 'var', 'final', or a ty
pe.", | 908 r"""Try removing 'void' keyword or replace it with 'var', 'final', or a
type.""", |
1038 dart2jsCode: "VOID_NOT_ALLOWED", | 909 dart2jsCode: "VOID_NOT_ALLOWED"); |
1039 format: _formatInvalidVoid); | 910 |
1040 | 911 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1041 typedef FastaMessage _InvalidVoid(Uri uri, int charOffset); | 912 const UnboundFastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType = |
1042 | 913 const UnboundFastaCode<_BuiltInIdentifierAsType>("BuiltInIdentifierAsType", |
1043 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 914 template: r"""Can't use '#lexeme' as a type.""", |
1044 FastaMessage _formatInvalidVoid(Uri uri, int charOffset) { | |
1045 return new FastaMessage(uri, charOffset, codeInvalidVoid, | |
1046 message: "Type 'void' can't be used here because it isn't a return type.", | |
1047 tip: | |
1048 "Try removing 'void' keyword or replace it with 'var', 'final', or a t
ype.", | |
1049 arguments: {}); | |
1050 } | |
1051 | |
1052 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | |
1053 const FastaCode<_BuiltInIdentifierAsType> codeBuiltInIdentifierAsType = | |
1054 const FastaCode<_BuiltInIdentifierAsType>("BuiltInIdentifierAsType", | |
1055 template: r"Can't use '#lexeme' as a type.", | |
1056 analyzerCode: "EXPECTED_TYPE_NAME", | 915 analyzerCode: "EXPECTED_TYPE_NAME", |
1057 dart2jsCode: "EXTRANEOUS_MODIFIER", | 916 dart2jsCode: "EXTRANEOUS_MODIFIER", |
1058 format: _formatBuiltInIdentifierAsType); | 917 bind: _bindBuiltInIdentifierAsType); |
1059 | 918 |
1060 typedef FastaMessage _BuiltInIdentifierAsType( | 919 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1061 Uri uri, int charOffset, Token token); | 920 typedef _BuiltInIdentifierAsType = FastaMessage Function(Uri, int) Function( |
1062 | 921 Token token); |
1063 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 922 |
1064 FastaMessage _formatBuiltInIdentifierAsType( | 923 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1065 Uri uri, int charOffset, Token token) { | 924 FastaMessage Function(Uri, int) _bindBuiltInIdentifierAsType(Token token) { |
1066 String lexeme = token.lexeme; | 925 FastaMessage bind(Uri uri, int charOffset) { |
1067 return new FastaMessage(uri, charOffset, codeBuiltInIdentifierAsType, | 926 String lexeme = token.lexeme; |
1068 message: "Can't use '$lexeme' as a type.", arguments: {'token': token}); | 927 return new FastaMessage(uri, charOffset, codeBuiltInIdentifierAsType, |
1069 } | 928 message: """Can't use '$lexeme' as a type.""", |
1070 | 929 arguments: {'token': token}); |
1071 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 930 } |
1072 const FastaCode<_GeneratorReturnsValue> codeGeneratorReturnsValue = | 931 |
1073 const FastaCode<_GeneratorReturnsValue>("GeneratorReturnsValue", | 932 return bind; |
1074 template: r"'sync*' and 'async*' can't return a value.", | 933 } |
1075 dart2jsCode: "FASTA_IGNORED", | 934 |
1076 format: _formatGeneratorReturnsValue); | 935 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1077 | 936 const BoundFastaCode codeGeneratorReturnsValue = const BoundFastaCode( |
1078 typedef FastaMessage _GeneratorReturnsValue(Uri uri, int charOffset); | 937 "GeneratorReturnsValue", |
1079 | 938 template: r"""'sync*' and 'async*' can't return a value.""", |
1080 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 939 dart2jsCode: "FASTA_IGNORED"); |
1081 FastaMessage _formatGeneratorReturnsValue(Uri uri, int charOffset) { | 940 |
1082 return new FastaMessage(uri, charOffset, codeGeneratorReturnsValue, | 941 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1083 message: "'sync*' and 'async*' can't return a value.", arguments: {}); | 942 const BoundFastaCode codeListLiteralTypeArgumentMismatch = const BoundFastaCode( |
1084 } | 943 "ListLiteralTypeArgumentMismatch", |
1085 | 944 template: r"""Map literal requires two type arguments."""); |
1086 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 945 |
1087 const FastaCode<_BuiltInIdentifierInDeclaration> | 946 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 947 const UnboundFastaCode<_MethodNotFound> codeMethodNotFound = |
| 948 const UnboundFastaCode<_MethodNotFound>("MethodNotFound", |
| 949 template: r"""Method not found: '#name'.""", bind: _bindMethodNotFound); |
| 950 |
| 951 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 952 typedef _MethodNotFound = FastaMessage Function(Uri, int) Function(String name); |
| 953 |
| 954 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 955 FastaMessage Function(Uri, int) _bindMethodNotFound(String name) { |
| 956 FastaMessage bind(Uri uri, int charOffset) { |
| 957 return new FastaMessage(uri, charOffset, codeMethodNotFound, |
| 958 message: """Method not found: '$name'.""", arguments: {'name': name}); |
| 959 } |
| 960 |
| 961 return bind; |
| 962 } |
| 963 |
| 964 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 965 const UnboundFastaCode<_BuiltInIdentifierInDeclaration> |
1088 codeBuiltInIdentifierInDeclaration = | 966 codeBuiltInIdentifierInDeclaration = |
1089 const FastaCode<_BuiltInIdentifierInDeclaration>( | 967 const UnboundFastaCode<_BuiltInIdentifierInDeclaration>( |
1090 "BuiltInIdentifierInDeclaration", | 968 "BuiltInIdentifierInDeclaration", |
1091 template: r"Can't use '#lexeme' as a name here.", | 969 template: r"""Can't use '#lexeme' as a name here.""", |
1092 dart2jsCode: "GENERIC", | 970 dart2jsCode: "GENERIC", |
1093 format: _formatBuiltInIdentifierInDeclaration); | 971 bind: _bindBuiltInIdentifierInDeclaration); |
1094 | 972 |
1095 typedef FastaMessage _BuiltInIdentifierInDeclaration( | 973 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1096 Uri uri, int charOffset, Token token); | 974 typedef _BuiltInIdentifierInDeclaration = FastaMessage Function(Uri, int) |
1097 | 975 Function(Token token); |
1098 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 976 |
1099 FastaMessage _formatBuiltInIdentifierInDeclaration( | 977 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1100 Uri uri, int charOffset, Token token) { | 978 FastaMessage Function(Uri, int) _bindBuiltInIdentifierInDeclaration( |
1101 String lexeme = token.lexeme; | 979 Token token) { |
1102 return new FastaMessage(uri, charOffset, codeBuiltInIdentifierInDeclaration, | 980 FastaMessage bind(Uri uri, int charOffset) { |
1103 message: "Can't use '$lexeme' as a name here.", | 981 String lexeme = token.lexeme; |
1104 arguments: {'token': token}); | 982 return new FastaMessage(uri, charOffset, codeBuiltInIdentifierInDeclaration, |
1105 } | 983 message: """Can't use '$lexeme' as a name here.""", |
1106 | 984 arguments: {'token': token}); |
1107 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 985 } |
1108 const FastaCode<_NonAsciiIdentifier> codeNonAsciiIdentifier = const FastaCode< | 986 |
| 987 return bind; |
| 988 } |
| 989 |
| 990 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 991 const UnboundFastaCode<_RedirectionTargetNotFound> |
| 992 codeRedirectionTargetNotFound = |
| 993 const UnboundFastaCode<_RedirectionTargetNotFound>( |
| 994 "RedirectionTargetNotFound", |
| 995 template: r"""Redirection constructor target not found: '#name'""", |
| 996 bind: _bindRedirectionTargetNotFound); |
| 997 |
| 998 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 999 typedef _RedirectionTargetNotFound = FastaMessage Function(Uri, int) Function( |
| 1000 String name); |
| 1001 |
| 1002 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 1003 FastaMessage Function(Uri, int) _bindRedirectionTargetNotFound(String name) { |
| 1004 FastaMessage bind(Uri uri, int charOffset) { |
| 1005 return new FastaMessage(uri, charOffset, codeRedirectionTargetNotFound, |
| 1006 message: """Redirection constructor target not found: '$name'""", |
| 1007 arguments: {'name': name}); |
| 1008 } |
| 1009 |
| 1010 return bind; |
| 1011 } |
| 1012 |
| 1013 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
| 1014 const UnboundFastaCode< |
| 1015 _NonAsciiIdentifier> codeNonAsciiIdentifier = const UnboundFastaCode< |
1109 _NonAsciiIdentifier>("NonAsciiIdentifier", | 1016 _NonAsciiIdentifier>("NonAsciiIdentifier", |
1110 template: | 1017 template: |
1111 r"The non-ASCII character '#character' (#unicode) can't be used in ident
ifiers, only in strings and comments.", | 1018 r"""The non-ASCII character '#character' (#unicode) can't be used in ide
ntifiers, only in strings and comments.""", |
1112 tip: | 1019 tip: |
1113 r"Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (a
dollar sign).", | 1020 r"""Try using an US-ASCII letter, a digit, '_' (an underscore), or '$' (
a dollar sign).""", |
1114 analyzerCode: "ILLEGAL_CHARACTER", | 1021 analyzerCode: "ILLEGAL_CHARACTER", |
1115 dart2jsCode: "BAD_INPUT_CHARACTER", | 1022 dart2jsCode: "BAD_INPUT_CHARACTER", |
1116 format: _formatNonAsciiIdentifier); | 1023 bind: _bindNonAsciiIdentifier); |
1117 | 1024 |
1118 typedef FastaMessage _NonAsciiIdentifier( | 1025 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1119 Uri uri, int charOffset, String character, int codePoint); | 1026 typedef _NonAsciiIdentifier = FastaMessage Function(Uri, int) Function( |
1120 | 1027 String character, int codePoint); |
1121 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 1028 |
1122 FastaMessage _formatNonAsciiIdentifier( | 1029 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
1123 Uri uri, int charOffset, String character, int codePoint) { | 1030 FastaMessage Function(Uri, int) _bindNonAsciiIdentifier( |
1124 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; | 1031 String character, int codePoint) { |
1125 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier, | 1032 FastaMessage bind(Uri uri, int charOffset) { |
1126 message: | 1033 String unicode = "(U+${codePoint.toRadixString(16).padLeft(4, '0')})"; |
1127 "The non-ASCII character '$character' ($unicode) can't be used in iden
tifiers, only in strings and comments.", | 1034 return new FastaMessage(uri, charOffset, codeNonAsciiIdentifier, |
1128 tip: "Try using an US-ASCII letter, a digit, '_' (an underscore), or '\$'
(a dollar sign).", | 1035 message: |
1129 arguments: {'character': character, 'codePoint': codePoint}); | 1036 """The non-ASCII character '$character' ($unicode) can't be used in
identifiers, only in strings and comments.""", |
1130 } | 1037 tip: """Try using an US-ASCII letter, a digit, '_' (an underscore), or '
\$' (a dollar sign).""", |
| 1038 arguments: {'character': character, 'codePoint': codePoint}); |
| 1039 } |
| 1040 |
| 1041 return bind; |
| 1042 } |
OLD | NEW |