Index: pkg/compiler/lib/src/parser/parser.dart |
diff --git a/pkg/compiler/lib/src/parser/parser.dart b/pkg/compiler/lib/src/parser/parser.dart |
index 68f96bc363c60187aa22cd6313edd5fb5918061f..6ed2657b74a53e158e607f8e2b38a95ab8db671c 100644 |
--- a/pkg/compiler/lib/src/parser/parser.dart |
+++ b/pkg/compiler/lib/src/parser/parser.dart |
@@ -2697,10 +2697,20 @@ class Parser { |
Token parseAssertStatement(Token token) { |
Token assertKeyword = token; |
+ Token commaToken = null; |
token = expect('assert', token); |
- expect('(', token); |
- token = parseArguments(token); |
- listener.handleAssertStatement(assertKeyword, token); |
+ token = expect('(', token); |
+ bool old = mayParseFunctionExpressions; |
+ mayParseFunctionExpressions = true; |
+ token = parseExpression(token); |
+ if (optional(',', token)) { |
+ commaToken = token; |
+ token = token.next; |
+ token = parseExpression(token); |
+ } |
+ token = expect(')', token); |
+ mayParseFunctionExpressions = old; |
+ listener.handleAssertStatement(assertKeyword, commaToken, token); |
return expectSemicolon(token); |
} |