Index: pkg/front_end/lib/src/fasta/source/diet_listener.dart |
diff --git a/pkg/front_end/lib/src/fasta/source/diet_listener.dart b/pkg/front_end/lib/src/fasta/source/diet_listener.dart |
index defefc3e1a710fa7d248c79d2025b06586b10c77..825c468daa3417fb4341ce176badfe3cb2d48b56 100644 |
--- a/pkg/front_end/lib/src/fasta/source/diet_listener.dart |
+++ b/pkg/front_end/lib/src/fasta/source/diet_listener.dart |
@@ -495,6 +495,9 @@ class DietListener extends StackListener { |
bool allowAbstract = asyncModifier == AsyncMarker.Sync; |
parser.parseFunctionBody(token, isExpression, allowAbstract); |
var body = listener.pop(); |
+ if (listener.stack.length == 1) { |
ahe
2017/04/06 14:25:21
Could you explain what this is for?
scheglov
2017/04/06 15:51:55
AstBuilder puts more data on the stack than the ot
ahe
2017/04/06 15:57:32
Would it be possible to not do that? I'm trying to
scheglov
2017/04/06 16:06:05
The stack is empty after parsing a function.
But i
ahe
2017/05/31 14:15:38
What do you mean by removing a function body?
scheglov
2017/05/31 21:46:20
The statement "var body = listener.pop();" removes
ahe
2017/06/01 12:13:01
I see. After calling parseFunctionBody, there shou
|
+ listener.pop(); // constructor initializers |
+ } |
listener.checkEmpty(token.charOffset); |
listener.finishFunction(formals, asyncModifier, body); |
} on InputError { |