| 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 library engine.error; | 5 library engine.error; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'ast.dart' show AstNode; | 9 import 'ast.dart' show AstNode; |
| 10 import 'element.dart'; | 10 import 'element.dart'; |
| (...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 | 1942 |
| 1943 /** | 1943 /** |
| 1944 * 14.1 Imports: It is a compile-time error if the current library declares a | 1944 * 14.1 Imports: It is a compile-time error if the current library declares a |
| 1945 * top-level member named <i>p</i>. | 1945 * top-level member named <i>p</i>. |
| 1946 */ | 1946 */ |
| 1947 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = | 1947 static const CompileTimeErrorCode PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER = |
| 1948 const CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', | 1948 const CompileTimeErrorCode('PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER', |
| 1949 "The name '{0}' is already used as an import prefix and cannot be used
to name a top-level element"); | 1949 "The name '{0}' is already used as an import prefix and cannot be used
to name a top-level element"); |
| 1950 | 1950 |
| 1951 /** | 1951 /** |
| 1952 * 16.32 Identifier Reference: If d is a prefix p, a compile-time error |
| 1953 * occurs unless the token immediately following d is '.'. |
| 1954 */ |
| 1955 static const CompileTimeErrorCode PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT = |
| 1956 const CompileTimeErrorCode('PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT', |
| 1957 "The name '{0}' refers to an import prefix, so it must be followed by
'.'"); |
| 1958 |
| 1959 /** |
| 1952 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named | 1960 * 6.2.2 Optional Formals: It is a compile-time error if the name of a named |
| 1953 * optional parameter begins with an '_' character. | 1961 * optional parameter begins with an '_' character. |
| 1954 */ | 1962 */ |
| 1955 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = | 1963 static const CompileTimeErrorCode PRIVATE_OPTIONAL_PARAMETER = |
| 1956 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', | 1964 const CompileTimeErrorCode('PRIVATE_OPTIONAL_PARAMETER', |
| 1957 "Named optional parameters cannot start with an underscore"); | 1965 "Named optional parameters cannot start with an underscore"); |
| 1958 | 1966 |
| 1959 /** | 1967 /** |
| 1960 * 12.1 Constants: It is a compile-time error if the value of a compile-time | 1968 * 12.1 Constants: It is a compile-time error if the value of a compile-time |
| 1961 * constant expression depends on itself. | 1969 * constant expression depends on itself. |
| (...skipping 2968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4930 * Initialize a newly created error code to have the given [name]. | 4938 * Initialize a newly created error code to have the given [name]. |
| 4931 */ | 4939 */ |
| 4932 const TodoCode(String name) : super(name, "{0}"); | 4940 const TodoCode(String name) : super(name, "{0}"); |
| 4933 | 4941 |
| 4934 @override | 4942 @override |
| 4935 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; | 4943 ErrorSeverity get errorSeverity => ErrorSeverity.INFO; |
| 4936 | 4944 |
| 4937 @override | 4945 @override |
| 4938 ErrorType get type => ErrorType.TODO; | 4946 ErrorType get type => ErrorType.TODO; |
| 4939 } | 4947 } |
| OLD | NEW |