You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the grammar for match, i.e. for the nonterminal MatchExpression, in MatchArms the right-hand side of the non-last arms only allows skipping the , for BlockExpression. However it seems to be the case that any ExpressionWithBlock works without the ,. Is this correct?
Furthermore, currently the case of a BlockExpression followed by , matches both alternatives of the BlockExpression ,? | Expression ,. Perhaps a nicer rule would use ExpressionWithoutBlock , | ExpressionWithBlock ,?, in effect being similar to my proposed rule for ExpressionStatement in #773, but with comma instead of semicolon.
Finally, in the last arm, the BlockExpression | Expression part seems a bit redundant as a BlockExpression is an Expression.
The text was updated successfully, but these errors were encountered:
Semicolon or comma in expression statements or match arms, respectively, are optional, but part of the statement / match arm.
Also remove a note about proc-macros from the page about BlockExpression.
Closesrust-lang#773 and closesrust-lang#774.
In the grammar for
match
, i.e. for the nonterminalMatchExpression
, inMatchArms
the right-hand side of the non-last arms only allows skipping the,
forBlockExpression
. However it seems to be the case that anyExpressionWithBlock
works without the,
. Is this correct?Furthermore, currently the case of a
BlockExpression
followed by,
matches both alternatives of theBlockExpression ,? | Expression ,
. Perhaps a nicer rule would useExpressionWithoutBlock , | ExpressionWithBlock ,?
, in effect being similar to my proposed rule forExpressionStatement
in #773, but with comma instead of semicolon.Finally, in the last arm, the
BlockExpression | Expression
part seems a bit redundant as aBlockExpression
is anExpression
.The text was updated successfully, but these errors were encountered: