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

Side by Side Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1173523002: Fix analyzer's handling of import prefixes not followed by '.'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/element_resolver.dart ('k') | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698