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 3b790afdff5bb954e906e6563bbacf0d005a45ba..0b4c2e5bbef4edb5a10a46fb4982289e2318edd4 100644 |
--- a/pkg/compiler/lib/src/parser/node_listener.dart |
+++ b/pkg/compiler/lib/src/parser/node_listener.dart |
@@ -946,6 +946,14 @@ class NodeListener extends ElementListener { |
reporter.log(message); |
} |
+ @override |
+ void handleInvalidFunctionBody(Token token) { |
+ if (!lastErrorWasNativeFunctionBody) { |
+ pushNode(null); |
+ } |
+ lastErrorWasNativeFunctionBody = false; |
+ } |
+ |
void internalError({Token token, Node node}) { |
// TODO(ahe): This should call reporter.internalError. |
Spannable spannable = (token == null) ? node : token; |