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

Unified Diff: runtime/vm/parser.cc

Issue 11416254: Eliminate support for old getter syntax (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 15525)
+++ runtime/vm/parser.cc (working copy)
@@ -29,8 +29,6 @@
DEFINE_FLAG(bool, silent_warnings, false, "Silence warnings.");
DEFINE_FLAG(bool, warn_legacy_map_literal, false,
"Warning on legacy map literal syntax (single type argument)");
-DEFINE_FLAG(bool, warn_legacy_getters, false,
- "Warning on legacy getter syntax");
DEFINE_FLAG(bool, strict_function_literals, false,
"enforce new function literal rules");
DEFINE_FLAG(bool, fail_legacy_abstract, false,
@@ -2486,16 +2484,6 @@
}
if (!method->IsGetter()) {
ParseFormalParameterList(allow_explicit_default_values, &method->params);
- } else {
- // TODO(hausner): Remove this once the old getter syntax with
- // empty parameter list is no longer supported.
- if (CurrentToken() == Token::kLPAREN) {
- if (FLAG_warn_legacy_getters) {
- Warning("legacy getter syntax, remove parenthesis");
- }
- ConsumeToken();
- ExpectToken(Token::kRPAREN);
- }
}
// Now that we know the parameter list, we can distinguish between the
@@ -4010,12 +3998,8 @@
const intptr_t accessor_pos = TokenPos();
ParamList params;
- if (FLAG_warn_legacy_getters &&
- is_getter && (CurrentToken() == Token::kLPAREN)) {
- Warning("legacy getter syntax, remove parenthesis");
- }
- // TODO(hausner): Remove the kLPAREN check once we remove old getter syntax.
- if (!is_getter || (CurrentToken() == Token::kLPAREN)) {
+
+ if (!is_getter) {
const bool allow_explicit_default_values = true;
ParseFormalParameterList(allow_explicit_default_values, &params);
}
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698