Skip to content

Commit 0a51fcd

Browse files
authored
Fix FunctionLiteral grammar (#3887)
1 parent 1760c09 commit 0a51fcd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

spec/expression.dd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,12 +2274,15 @@ $(H3 $(LNAME2 function_literals, Function Literals))
22742274

22752275
$(GRAMMAR
22762276
$(GNAME FunctionLiteral):
2277-
$(D function) $(GLINK RefOrAutoRef)$(OPT) $(GLINK2 type, Type)$(OPT) $(GLINK ParameterWithAttributes)$(OPT) $(GLINK FunctionLiteralBody)
2278-
$(D delegate) $(GLINK RefOrAutoRef)$(OPT) $(GLINK2 type, Type)$(OPT) $(GLINK ParameterWithMemberAttributes)$(OPT) $(GLINK FunctionLiteralBody)
2277+
$(D function) $(GLINK RefOrAutoRef)$(OPT) $(GLINK BasicTypeWithSuffixes)$(OPT) $(GLINK ParameterWithAttributes)$(OPT) $(GLINK FunctionLiteralBody)
2278+
$(D delegate) $(GLINK RefOrAutoRef)$(OPT) $(GLINK BasicTypeWithSuffixes)$(OPT) $(GLINK ParameterWithMemberAttributes)$(OPT) $(GLINK FunctionLiteralBody)
22792279
$(GLINK RefOrAutoRef)$(OPT) $(GLINK ParameterWithMemberAttributes) $(GLINK FunctionLiteralBody)
22802280
$(GLINK2 statement, BlockStatement)
22812281
$(IDENTIFIER) $(D =>) $(GLINK AssignExpression)
22822282

2283+
$(GNAME BasicTypeWithSuffixes):
2284+
$(GLINK2 type, BasicType) $(GLINK2 type, TypeSuffixes)$(OPT)
2285+
22832286
$(GNAME ParameterWithAttributes):
22842287
$(GLINK2 function, Parameters) $(GLINK2 function, FunctionAttributes)$(OPT)
22852288

0 commit comments

Comments
 (0)