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

Unified Diff: dart/lib/compiler/implementation/resolver.dart

Issue 10907129: Parse and resolve new syntax for named parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 8 years, 3 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
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/lib/compiler/implementation/resolver.dart
diff --git a/dart/lib/compiler/implementation/resolver.dart b/dart/lib/compiler/implementation/resolver.dart
index 9bec4367defffc025f59fb2bb033cacec06e826a..afc79e0c9fbb8b0e60db0bb113034f552bb4c75c 100644
--- a/dart/lib/compiler/implementation/resolver.dart
+++ b/dart/lib/compiler/implementation/resolver.dart
@@ -2325,7 +2325,8 @@ class SignatureResolver extends CommonResolverVisitor<Element> {
Element visitNodeList(NodeList node) {
// This must be a list of optional arguments.
- if (node.beginToken.stringValue !== '[') {
+ String value = node.beginToken.stringValue;
+ if ((value !== '[') && (value !== '{')) {
internalError(node, "expected optional parameters");
}
LinkBuilder<Element> elements = analyzeNodes(node.nodes);
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698