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

Unified Diff: frog/parser.dart

Issue 8678011: fix parser error (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: prereviewed Created 9 years, 1 month 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/frogsh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/parser.dart
diff --git a/frog/parser.dart b/frog/parser.dart
index e130f30b2acd1141defb7f5647a098b3f4691cf0..4cc909646ada75f5c57b77cc046e5541e8832797 100644
--- a/frog/parser.dart
+++ b/frog/parser.dart
@@ -973,6 +973,10 @@ class Parser {
var body = functionBody(true);
return _makeFunction(expr, formals, body);
} else {
+ if (expr is DeclaredIdentifier) {
+ _error('illegal target for call, did you mean to declare a function?',
+ expr.span);
+ }
var args = arguments();
return finishPostfixExpression(
new CallExpression(expr, args, _makeSpan(expr.span.start)));
« no previous file with comments | « frog/frogsh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698