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

Unified Diff: pkg/compiler/lib/src/parser/node_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/compiler/lib/src/parser/node_listener.dart
diff --git a/pkg/compiler/lib/src/parser/node_listener.dart b/pkg/compiler/lib/src/parser/node_listener.dart
index b5cbad61da0b334b0f4874726239afca58218d09..b1295c55c0a7b033b081c43934a2129c8bbcafeb 100644
--- a/pkg/compiler/lib/src/parser/node_listener.dart
+++ b/pkg/compiler/lib/src/parser/node_listener.dart
@@ -6,6 +6,8 @@ library dart2js.parser.node_listener;
import '../common.dart';
import '../elements/elements.dart' show CompilationUnitElement;
+import 'package:front_end/src/fasta/parser/parser.dart'
+ show FormalParameterType;
import 'package:front_end/src/fasta/scanner/precedence.dart' as Precedence
show INDEX_INFO;
import 'package:front_end/src/fasta/scanner.dart' show StringToken, Token;
@@ -182,7 +184,7 @@ class NodeListener extends ElementListener {
}
@override
- void endFormalParameter(Token thisKeyword) {
+ void endFormalParameter(Token thisKeyword, FormalParameterType kind) {
Expression name = popNode();
if (thisKeyword != null) {
Identifier thisIdentifier = new Identifier(thisKeyword);
@@ -723,6 +725,10 @@ class NodeListener extends ElementListener {
}
@override
+ void handleFormalParameterWithoutValue(Token token) {
Paul Berry 2017/02/22 20:50:04 Nit: run dartfmt
+ }
+
+ @override
void endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
Block finallyBlock = null;
if (finallyKeyword != null) {

Powered by Google App Engine
This is Rietveld 408576698