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/parser/ParserErrorCode.java

Issue 8564027: Report errors for default parameter values, issue 351 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for tests and other Created 9 years, 1 month 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 package com.google.dart.compiler.parser; 1 package com.google.dart.compiler.parser;
2 2
3 import com.google.dart.compiler.ErrorCode; 3 import com.google.dart.compiler.ErrorCode;
4 import com.google.dart.compiler.ErrorSeverity; 4 import com.google.dart.compiler.ErrorSeverity;
5 import com.google.dart.compiler.SubSystem; 5 import com.google.dart.compiler.SubSystem;
6 6
7 /** 7 /**
8 * {@link ErrorCode}s for parser. 8 * {@link ErrorCode}s for parser.
9 */ 9 */
10 public enum ParserErrorCode implements ErrorCode { 10 public enum ParserErrorCode implements ErrorCode {
11 ABSTRACT_MEMBER_IN_INTERFACE("Abstract members are not allowed in interfaces") , 11 ABSTRACT_MEMBER_IN_INTERFACE("Abstract members are not allowed in interfaces") ,
12 CATCH_OR_FINALLY_EXPECTED("catch or finally clause expected."), 12 CATCH_OR_FINALLY_EXPECTED("catch or finally clause expected."),
13 DEFAULT_PARAMETER_ABSTRACT("Default values can not be specified in abstract me thod"),
zundel 2011/11/15 16:16:57 DEFAULT_VALUE_NOT_IN_ABSTRACT_METHOD("Default valu
scheglov 2011/11/15 16:33:21 Hm... I don't understand why to use "NOT" here and
zundel 2011/11/15 16:36:46 The convention in this file (with some exceptions)
scheglov 2011/11/15 16:45:58 Done.
14 DEFAULT_PARAMETER_CLOSURE("Default values can not be specified in closure para meter"),
zundel 2011/11/15 16:16:57 DEFAULT_VALUE_NOT_IN_CLOSURE("Default value can ..
15 DEFAULT_PARAMETER_INTERFACE("Default values can not be specified in signature of an interface method"),
16 DEFAULT_PARAMETER_TYPEDEF("Default values can not be specified in closure type definition"),
zundel 2011/11/15 16:16:57 DEFAULT_VALUE_NOT_IN_TYPEDEF("Default value can ..
13 DEFAULT_POSITIONAL_PARAMETER("Positional parameters cannot have default values "), 17 DEFAULT_POSITIONAL_PARAMETER("Positional parameters cannot have default values "),
14 DISALLOWED_ABSTRACT_KEYWORD("Abstract keyword not allowed here"), 18 DISALLOWED_ABSTRACT_KEYWORD("Abstract keyword not allowed here"),
15 DISALLOWED_FACTORY_KEYWORD("Factory keyword not allowed here"), 19 DISALLOWED_FACTORY_KEYWORD("Factory keyword not allowed here"),
20 EACH_PARAMETER_IS_REQUIRED("Each parameter should be required"),
zundel 2011/11/15 16:16:57 NAMED_PARAMETER_NOT_ALLOWED("Named parameter is no
scheglov 2011/11/15 16:33:21 Done.
16 EXPECTED_ARRAY_OR_MAP_LITERAL("Expected array or map literal"), 21 EXPECTED_ARRAY_OR_MAP_LITERAL("Expected array or map literal"),
17 EXPECTED_CASE_OR_DEFAULT("Expected 'case' or 'default'"), 22 EXPECTED_CASE_OR_DEFAULT("Expected 'case' or 'default'"),
18 EXPECTED_CLASS_DECLARATION_LBRACE("Expected '{' in class or interface declarat ion"), 23 EXPECTED_CLASS_DECLARATION_LBRACE("Expected '{' in class or interface declarat ion"),
19 EXPECTED_COMMA_OR_RIGHT_BRACE("Expected ',' or '}'"), 24 EXPECTED_COMMA_OR_RIGHT_BRACE("Expected ',' or '}'"),
20 EXPECTED_COMMA_OR_RIGHT_PAREN("Expected ',' or ')', but got '%s'"), 25 EXPECTED_COMMA_OR_RIGHT_PAREN("Expected ',' or ')', but got '%s'"),
21 EXPECTED_EOS("Unexpected token '%s' (expected end of file)"), 26 EXPECTED_EOS("Unexpected token '%s' (expected end of file)"),
22 EXPECTED_IDENTIFIER("Expected identifier"), 27 EXPECTED_IDENTIFIER("Expected identifier"),
23 EXPECTED_LEFT_PAREN("'(' expected"), 28 EXPECTED_LEFT_PAREN("'(' expected"),
24 EXPECTED_PERIOD_OR_LEFT_BRACKET("Expected '.' or '['"), 29 EXPECTED_PERIOD_OR_LEFT_BRACKET("Expected '.' or '['"),
25 EXPECTED_PREFIX_KEYWORD("Expected 'prefix' after comma"), 30 EXPECTED_PREFIX_KEYWORD("Expected 'prefix' after comma"),
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 85 }
81 86
82 public ErrorSeverity getErrorSeverity() { 87 public ErrorSeverity getErrorSeverity() {
83 return severity; 88 return severity;
84 } 89 }
85 90
86 public SubSystem getSubSystem() { 91 public SubSystem getSubSystem() {
87 return SubSystem.PARSER; 92 return SubSystem.PARSER;
88 } 93 }
89 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698