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