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

Side by Side Diff: compiler/java/com/google/dart/compiler/DartCompilerErrorCode.java

Issue 10532100: Issue 3532. Report error if one unit included twice (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
Brian Wilkerson 2012/06/12 15:34:14 nit: copyright year
scheglov 2012/06/12 18:17:51 Done.
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 package com.google.dart.compiler; 5 package com.google.dart.compiler;
6 6
7 /** 7 /**
8 * Valid error codes for the errors produced by the Dart compiler. 8 * Valid error codes for the errors produced by the Dart compiler.
9 */ 9 */
10 public enum DartCompilerErrorCode implements ErrorCode { 10 public enum DartCompilerErrorCode implements ErrorCode {
11 ENTRY_POINT_METHOD_CANNOT_HAVE_PARAMETERS(ErrorSeverity.WARNING, 11 ENTRY_POINT_METHOD_CANNOT_HAVE_PARAMETERS(ErrorSeverity.WARNING,
12 "Main entry point method cannot have parameters"), 12 "Main entry point method cannot have parameters"),
13 ENTRY_POINT_METHOD_MAY_NOT_BE_GETTER(ErrorSeverity.WARNING, 13 ENTRY_POINT_METHOD_MAY_NOT_BE_GETTER(ErrorSeverity.WARNING,
14 "Entry point \"%s\" may not be a getter"), 14 "Entry point \"%s\" may not be a getter"),
15 ENTRY_POINT_METHOD_MAY_NOT_BE_SETTER(ErrorSeverity.WARNING, 15 ENTRY_POINT_METHOD_MAY_NOT_BE_SETTER(ErrorSeverity.WARNING,
16 "Entry point \"%s\" may not be a setter"), 16 "Entry point \"%s\" may not be a setter"),
17 ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT("This source was included by %s via a " 17 ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT("This source was included by %s via a "
18 + "#source directive, so cannot itself contain directives"), 18 + "#source directive, so cannot itself contain directives"),
19 IO("Input/Output error: %s"), 19 IO("Input/Output error: %s"),
20 MISSING_LIBRARY_DIRECTIVE("a library which is imported is missing a #library d irective: %s"), 20 MISSING_LIBRARY_DIRECTIVE("a library which is imported is missing a #library d irective: %s"),
21 MISSING_SOURCE("Cannot find referenced source: %s"); 21 MISSING_SOURCE("Cannot find referenced source: %s"),
22 UNIT_WAS_ALREADY_INCLUDED("Unit '%s' was already included");
22 private final ErrorSeverity severity; 23 private final ErrorSeverity severity;
23 private final String message; 24 private final String message;
24 25
25 /** 26 /**
26 * Initialize a newly created error code to have the given message and ERROR s everity. 27 * Initialize a newly created error code to have the given message and ERROR s everity.
27 */ 28 */
28 private DartCompilerErrorCode(String message) { 29 private DartCompilerErrorCode(String message) {
29 this(ErrorSeverity.ERROR, message); 30 this(ErrorSeverity.ERROR, message);
30 } 31 }
31 32
(...skipping 18 matching lines...) Expand all
50 @Override 51 @Override
51 public SubSystem getSubSystem() { 52 public SubSystem getSubSystem() {
52 return SubSystem.COMPILER; 53 return SubSystem.COMPILER;
53 } 54 }
54 55
55 @Override 56 @Override
56 public boolean needsRecompilation() { 57 public boolean needsRecompilation() {
57 return true; 58 return true;
58 } 59 }
59 } 60 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698