OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import '../common.dart'; | 5 import '../common.dart'; |
6 import '../common/backend_api.dart' show ForeignResolver; | 6 import '../common/backend_api.dart' show ForeignResolver; |
7 import '../common/resolution.dart' show ParsingContext, Resolution; | 7 import '../common/resolution.dart' show ParsingContext, Resolution; |
8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
9 import '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 /// <gvn-string> values are 'true' and 'false'. The default if unspecified | 250 /// <gvn-string> values are 'true' and 'false'. The default if unspecified |
251 /// is 'false'. | 251 /// is 'false'. |
252 /// | 252 /// |
253 /// <new-string> values are 'true' and 'false'. The default if unspecified | 253 /// <new-string> values are 'true' and 'false'. The default if unspecified |
254 /// is 'false'. A 'true' value means that each evaluation returns a fresh | 254 /// is 'false'. A 'true' value means that each evaluation returns a fresh |
255 /// (new) object that cannot be unaliased with existing objects. | 255 /// (new) object that cannot be unaliased with existing objects. |
256 /// | 256 /// |
257 /// Each tag kind (including the 'type-tag's) can only occur once in the | 257 /// Each tag kind (including the 'type-tag's) can only occur once in the |
258 /// sequence. | 258 /// sequence. |
259 /// | 259 /// |
260 /// [specString] is the specification string, [resolveType] resolves named | 260 /// [specString] is the specification string, [lookupType] resolves named |
261 /// types into type values, [typesReturned] and [typesInstantiated] collects | 261 /// types into type values, [typesReturned] and [typesInstantiated] collects |
262 /// the types defined by the specification string, and [objectType] and | 262 /// the types defined by the specification string, and [objectType] and |
263 /// [nullType] define the types for `Object` and `Null`, respectively. The | 263 /// [nullType] define the types for `Object` and `Null`, respectively. The |
264 /// latter is used for the type strings of the form '' and 'var'. | 264 /// latter is used for the type strings of the form '' and 'var'. |
265 /// [validTags] can be used to restrict which tags are accepted. | 265 /// [validTags] can be used to restrict which tags are accepted. |
266 static void processSpecString( | 266 static void processSpecString( |
267 DiagnosticReporter reporter, Spannable spannable, String specString, | 267 DiagnosticReporter reporter, Spannable spannable, String specString, |
268 {Iterable<String> validTags, | 268 {Iterable<String> validTags, |
269 void setSideEffects(SideEffects newEffects), | 269 void setSideEffects(SideEffects newEffects), |
270 void setThrows(NativeThrowBehavior throwKind), | 270 void setThrows(NativeThrowBehavior throwKind), |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 type = lookupType(typeString.substring(0, index)); | 1009 type = lookupType(typeString.substring(0, index)); |
1010 if (type != null) { | 1010 if (type != null) { |
1011 // TODO(sra): Parse type parameters. | 1011 // TODO(sra): Parse type parameters. |
1012 return type; | 1012 return type; |
1013 } | 1013 } |
1014 reporter.reportErrorMessage(spannable, MessageKind.GENERIC, | 1014 reporter.reportErrorMessage(spannable, MessageKind.GENERIC, |
1015 {'text': "Type '$typeString' not found."}); | 1015 {'text': "Type '$typeString' not found."}); |
1016 return const ResolutionDynamicType(); | 1016 return const ResolutionDynamicType(); |
1017 } | 1017 } |
1018 } | 1018 } |
OLD | NEW |