| 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.parser; | 5 package com.google.dart.compiler.parser; |
| 6 | 6 |
| 7 import com.google.dart.compiler.ErrorCode; | 7 import com.google.dart.compiler.ErrorCode; |
| 8 import com.google.dart.compiler.ErrorSeverity; | 8 import com.google.dart.compiler.ErrorSeverity; |
| 9 import com.google.dart.compiler.SubSystem; | 9 import com.google.dart.compiler.SubSystem; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * {@link ErrorCode}s for parser. | 12 * {@link ErrorCode}s for parser. |
| 13 * <p> | 13 * <p> |
| 14 * The convention in this file (with some exceptions) is that the enumeration na
me matches at least | 14 * The convention in this file (with some exceptions) is that the enumeration na
me matches at least |
| 15 * the beginning default English translation of the message. | 15 * the beginning default English translation of the message. |
| 16 */ | 16 */ |
| 17 public enum ParserErrorCode implements ErrorCode { | 17 public enum ParserErrorCode implements ErrorCode { |
| 18 ABSTRACT_MEMBER_IN_INTERFACE("Abstract members are not allowed in interfaces")
, | 18 ABSTRACT_MEMBER_IN_INTERFACE("Abstract members are not allowed in interfaces")
, |
| 19 ABSTRACT_METHOD_WITH_BODY("Abstract method cannot have a body"), | 19 ABSTRACT_METHOD_WITH_BODY("Abstract method cannot have a body"), |
| 20 ABSTRACT_TOP_LEVEL_ELEMENT("Only class can be abstract top-level element"), | 20 ABSTRACT_TOP_LEVEL_ELEMENT("Only class can be abstract top-level element"), |
| 21 BREAK_OUTSIDE_OF_LOOP("'break' used outside of loop, case statement"), | 21 BREAK_OUTSIDE_OF_LOOP("'break' used outside of loop, case statement"), |
| 22 RESERVED_WORD_AS_TYPE_NAME("Reserved word cannot be used as type name"), |
| 22 BUILT_IN_IDENTIFIER_AS_TYPE_NAME("Built-in identifier cannot be used as type n
ame"), | 23 BUILT_IN_IDENTIFIER_AS_TYPE_NAME("Built-in identifier cannot be used as type n
ame"), |
| 23 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME("Built-in identifier can not be used as ty
pe alias name"), | 24 BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME("Built-in identifier can not be used as ty
pe alias name"), |
| 24 BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME("Built-in identifier can not be used
as type variable name"), | 25 BUILT_IN_IDENTIFIER_AS_TYPE_VARIABLE_NAME("Built-in identifier can not be used
as type variable name"), |
| 25 CATCH_OR_FINALLY_EXPECTED("catch or finally clause expected."), | 26 CATCH_OR_FINALLY_EXPECTED("catch or finally clause expected."), |
| 26 CONTINUE_OUTSIDE_OF_LOOP("'continue' used outside of loop or case statement"), | 27 CONTINUE_OUTSIDE_OF_LOOP("'continue' used outside of loop or case statement"), |
| 27 DEFAULT_VALUE_CAN_NOT_BE_SPECIFIED_IN_CLOSURE( | 28 DEFAULT_VALUE_CAN_NOT_BE_SPECIFIED_IN_CLOSURE( |
| 28 "Default values cannot be specified in closure parameter"), | 29 "Default values cannot be specified in closure parameter"), |
| 29 DEFAULT_VALUE_CAN_NOT_BE_SPECIFIED_IN_TYPEDEF( | 30 DEFAULT_VALUE_CAN_NOT_BE_SPECIFIED_IN_TYPEDEF( |
| 30 "Default values cannot be specified in closure type definition"), | 31 "Default values cannot be specified in closure type definition"), |
| 31 DEFAULT_POSITIONAL_PARAMETER("Positional parameters cannot have default values
"), | 32 DEFAULT_POSITIONAL_PARAMETER("Positional parameters cannot have default values
"), |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 @Override | 132 @Override |
| 132 public SubSystem getSubSystem() { | 133 public SubSystem getSubSystem() { |
| 133 return SubSystem.PARSER; | 134 return SubSystem.PARSER; |
| 134 } | 135 } |
| 135 | 136 |
| 136 @Override | 137 @Override |
| 137 public boolean needsRecompilation() { | 138 public boolean needsRecompilation() { |
| 138 return true; | 139 return true; |
| 139 } | 140 } |
| 140 } | 141 } |
| OLD | NEW |