diff --git a/spec.html b/spec.html
index 60b6b85..e8e78bc 100644
--- a/spec.html
+++ b/spec.html
@@ -247,8 +247,10 @@
Tree Grammar
typedef (EagerSetter or LazySetter) Setter;
-typedef (EagerArrowExpression or
- LazyArrowExpression) ArrowExpression;
+typedef (EagerArrowExpressionWithFunctionBody or
+ LazyArrowExpressionWithFunctionBody or
+ EagerArrowExpressionWithExpression or
+ LazyArrowExpressionWithExpression) ArrowExpression;
// bindings
@@ -587,26 +589,41 @@ Tree Grammar
// `ArrowFunction`,
// `AsyncArrowFunction`
-interface EagerArrowExpression : Node {
+interface EagerArrowExpressionWithFunctionBody : Node {
// True for `AsyncArrowFunction`, false otherwise.
attribute boolean isAsync;
- // Null if and only if the body is an Expression.
- attribute FrozenArray<Directive>? directives;
- attribute ArrowExpressionContents contents;
+ attribute FrozenArray<Directive> directives;
+ attribute ArrowExpressionContentsWithFunctionBody contents;
+};
+interface LazyArrowExpressionWithFunctionBody : Node {
+ // True for `AsyncArrowFunction`, false otherwise.
+ attribute boolean isAsync;
+ attribute FrozenArray<Directive> directives;
+ [Lazy] attribute ArrowExpressionContentsWithFunctionBody contents;
+};
+interface EagerArrowExpressionWithExpression : Node {
+ // True for `AsyncArrowFunction`, false otherwise.
+ attribute boolean isAsync;
+ attribute ArrowExpressionContentsWithExpression contents;
};
-interface LazyArrowExpression : Node {
+interface LazyArrowExpressionWithExpression : Node {
// True for `AsyncArrowFunction`, false otherwise.
attribute boolean isAsync;
- // Null if and only if the body is an Expression.
- attribute FrozenArray<Directive>? directives;
- [Lazy] attribute ArrowExpressionContents contents;
+ [Lazy] attribute ArrowExpressionContentsWithExpression contents;
+};
+
+interface ArrowExpressionContentsWithFunctionBody : Node {
+ attribute AssertedParameterScope parameterScope;
+ attribute FormalParameters params;
+ attribute AssertedVarScope bodyScope;
+ attribute FunctionBody body;
};
-interface ArrowExpressionContents : Node {
+interface ArrowExpressionContentsWithExpression : Node {
attribute AssertedParameterScope parameterScope;
attribute FormalParameters params;
attribute AssertedVarScope bodyScope;
- attribute (FunctionBody or Expression) body;
+ attribute Expression body;
};
// `AssignmentExpression :: LeftHandSideExpression = AssignmentExpression`