| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 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 CONSOLE_WEB_MIX(ErrorSeverity.INFO, | 11 CONSOLE_WEB_MIX(ErrorSeverity.INFO, |
| 12 "Libraries 'dart:io' (console apps only) and 'dart:html' (web apps only) c
annot be used together"), | 12 "Libraries 'dart:io' (console apps only) and 'dart:html' (web apps only) c
annot be used together"), |
| 13 ENTRY_POINT_METHOD_CANNOT_HAVE_PARAMETERS(ErrorSeverity.WARNING, | 13 ENTRY_POINT_METHOD_CANNOT_HAVE_PARAMETERS(ErrorSeverity.WARNING, |
| 14 "Main entry point method cannot have parameters"), | 14 "Main entry point method cannot have parameters"), |
| 15 ENTRY_POINT_METHOD_MAY_NOT_BE_GETTER(ErrorSeverity.WARNING, | 15 ENTRY_POINT_METHOD_MAY_NOT_BE_GETTER(ErrorSeverity.WARNING, |
| 16 "Entry point \"%s\" may not be a getter"), | 16 "Entry point \"%s\" may not be a getter"), |
| 17 ENTRY_POINT_METHOD_MAY_NOT_BE_SETTER(ErrorSeverity.WARNING, | 17 ENTRY_POINT_METHOD_MAY_NOT_BE_SETTER(ErrorSeverity.WARNING, |
| 18 "Entry point \"%s\" may not be a setter"), | 18 "Entry point \"%s\" may not be a setter"), |
| 19 ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT("This part was included by %s via a " | 19 ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT("This part was included by %s via a " |
| 20 + "part directive, so cannot itself contain directives other than a 'part
of' directive"), | 20 + "part directive, so cannot itself contain directives other than a 'part
of' directive"), |
| 21 IO("Input/Output error: %s"), | 21 IO("Input/Output error: %s"), |
| 22 MIRRORS_NOT_FULLY_IMPLEMENTED(ErrorSeverity.WARNING, "dart:mirrors is not full
y implemented yet"), | 22 MIRRORS_NOT_FULLY_IMPLEMENTED(ErrorSeverity.WARNING, "dart:mirrors is not full
y implemented yet"), |
| 23 MISSING_LIBRARY_DIRECTIVE("a library which is imported is missing a library di
rective: %s"), | 23 MISSING_LIBRARY_DIRECTIVE("a library which is imported is missing a library di
rective: %s"), |
| 24 MISSING_SOURCE("Cannot find referenced source: %s"), | 24 MISSING_SOURCE("Cannot find referenced source: %s"), |
| 25 MISSING_PART_OF_DIRECTIVE("Missing 'part of' directive"), | 25 MISSING_PART_OF_DIRECTIVE("Unit is part of library '%s', but has no 'part of'
directive"), |
| 26 UNIT_WAS_ALREADY_INCLUDED("Unit '%s' was already included"), | 26 UNIT_WAS_ALREADY_INCLUDED("Unit '%s' was already included"), |
| 27 WRONG_PART_OF_NAME( | 27 WRONG_PART_OF_NAME( |
| 28 ErrorSeverity.WARNING, | 28 ErrorSeverity.WARNING, |
| 29 "This part was included by '%s' via a 'part' directive, but uses name '%s'
in 'part of' directive"); | 29 "This part was included by '%s' via a 'part' directive, but uses name '%s'
in 'part of' directive"); |
| 30 private final ErrorSeverity severity; | 30 private final ErrorSeverity severity; |
| 31 private final String message; | 31 private final String message; |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * Initialize a newly created error code to have the given message and ERROR s
everity. | 34 * Initialize a newly created error code to have the given message and ERROR s
everity. |
| 35 */ | 35 */ |
| (...skipping 22 matching lines...) Expand all Loading... |
| 58 @Override | 58 @Override |
| 59 public SubSystem getSubSystem() { | 59 public SubSystem getSubSystem() { |
| 60 return SubSystem.COMPILER; | 60 return SubSystem.COMPILER; |
| 61 } | 61 } |
| 62 | 62 |
| 63 @Override | 63 @Override |
| 64 public boolean needsRecompilation() { | 64 public boolean needsRecompilation() { |
| 65 return true; | 65 return true; |
| 66 } | 66 } |
| 67 } | 67 } |
| OLD | NEW |