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

Unified Diff: frog/leg/resolver.dart

Issue 9703105: Re-land r5529. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « frog/leg/compile_time_constants.dart ('k') | frog/leg/universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/resolver.dart
diff --git a/frog/leg/resolver.dart b/frog/leg/resolver.dart
index 369b69d04cae420c30c9804922173f10352e2ae7..d97f4682aec0f01af1a45be9be90684a0733e76f 100644
--- a/frog/leg/resolver.dart
+++ b/frog/leg/resolver.dart
@@ -813,6 +813,7 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
void handleArguments(Send node) {
int count = 0;
List<SourceString> namedArguments = <SourceString>[];
+ bool seenNamedArgument = false;
for (Link<Node> link = node.argumentsNode.nodes;
!link.isEmpty();
link = link.tail) {
@@ -820,8 +821,11 @@ class ResolverVisitor extends CommonResolverVisitor<Element> {
Expression argument = link.head;
visit(argument);
if (argument.asNamedArgument() != null) {
+ seenNamedArgument = true;
NamedArgument named = argument;
namedArguments.add(named.name.source);
+ } else if (seenNamedArgument) {
+ error(argument, MessageKind.INVALID_ARGUMENT_AFTER_NAMED);
}
}
mapping.setSelector(node, new Invocation(count, namedArguments));
« no previous file with comments | « frog/leg/compile_time_constants.dart ('k') | frog/leg/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698