| Index: pkg/dart_parser/lib/src/parser.dart
|
| diff --git a/pkg/dart_parser/lib/src/parser.dart b/pkg/dart_parser/lib/src/parser.dart
|
| index 38f63376eda8ec5f3a4395f49b9d200c21dcd052..ef6369e84eb6103be4e451a4e27462396fcb536c 100644
|
| --- a/pkg/dart_parser/lib/src/parser.dart
|
| +++ b/pkg/dart_parser/lib/src/parser.dart
|
| @@ -2,7 +2,7 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -library dart_parser;
|
| +library dart_parser.parser;
|
|
|
| import 'package:dart_scanner/src/keyword.dart' show
|
| Keyword;
|
| @@ -415,6 +415,22 @@ class Parser {
|
| }
|
| }
|
|
|
| + Token skipFormalParameters(Token token) {
|
| + // TODO(ahe): Shouldn't this be `beginFormalParameters`?
|
| + listener.beginOptionalFormalParameters(token);
|
| + if (!optional('(', token)) {
|
| + if (optional(';', token)) {
|
| + listener.reportError(token, ErrorKind.ExpectedOpenParens);
|
| + return token;
|
| + }
|
| + return listener.unexpected(token);
|
| + }
|
| + BeginGroupToken beginGroupToken = token;
|
| + Token endToken = beginGroupToken.endGroup;
|
| + listener.endFormalParameters(0, token, endToken);
|
| + return endToken.next;
|
| + }
|
| +
|
| Token parseFormalParameters(Token token) {
|
| Token begin = token;
|
| listener.beginFormalParameters(begin);
|
|
|