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

Unified Diff: pkg/front_end/lib/src/fasta/parser/listener.dart

Issue 2709783003: Parse optional and named parameters. (Closed)
Patch Set: Add 'FormalParameterType kind' to endFormalParameter() and add handleFormalParameterWithoutValue(). Created 3 years, 10 months 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
Index: pkg/front_end/lib/src/fasta/parser/listener.dart
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 5a400b94e4a5d7804b90b70da31aa87dd313f445..149d2bd80fc9696dee148a3eca06d96be13775db 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -9,6 +9,7 @@ import '../scanner/token.dart' show BeginGroupToken, Token;
import '../util/link.dart' show Link;
import 'error_kind.dart' show ErrorKind;
+import 'parser.dart' show FormalParameterType;
/// A parser event listener that does nothing except throw exceptions
/// on parser errors.
@@ -152,7 +153,7 @@ class Listener {
void beginFormalParameter(Token token) {}
- void endFormalParameter(Token thisKeyword) {
+ void endFormalParameter(Token thisKeyword, FormalParameterType kind) {
logEvent("FormalParameter");
}
@@ -871,6 +872,10 @@ class Listener {
logEvent("ValuedFormalParameter");
}
+ void handleFormalParameterWithoutValue(Token token) {
+ logEvent("FormalParameterWithoutValue");
+ }
+
void handleVoidKeyword(Token token) {
logEvent("VoidKeyword");
}

Powered by Google App Engine
This is Rietveld 408576698