@@ -155,17 +155,20 @@ impl<'a> Parser<'a> {
155
155
156
156
let mac = MacCall { path, args, prior_type_ascription : self . last_type_ascription } ;
157
157
158
- let kind = if delim == token:: Brace || self . token == token:: Semi || self . token == token:: Eof
159
- {
160
- StmtKind :: MacCall ( P ( MacCallStmt { mac, style, attrs, tokens : None } ) )
161
- } else {
162
- // Since none of the above applied, this is an expression statement macro.
163
- let e = self . mk_expr ( lo. to ( hi) , ExprKind :: MacCall ( mac) , AttrVec :: new ( ) ) ;
164
- let e = self . maybe_recover_from_bad_qpath ( e, true ) ?;
165
- let e = self . parse_dot_or_call_expr_with ( e, lo, attrs. into ( ) ) ?;
166
- let e = self . parse_assoc_expr_with ( 0 , LhsExpr :: AlreadyParsed ( e) ) ?;
167
- StmtKind :: Expr ( e)
168
- } ;
158
+ let kind =
159
+ if ( delim == token:: Brace && self . token != token:: Dot && self . token != token:: Question )
160
+ || self . token == token:: Semi
161
+ || self . token == token:: Eof
162
+ {
163
+ StmtKind :: MacCall ( P ( MacCallStmt { mac, style, attrs, tokens : None } ) )
164
+ } else {
165
+ // Since none of the above applied, this is an expression statement macro.
166
+ let e = self . mk_expr ( lo. to ( hi) , ExprKind :: MacCall ( mac) , AttrVec :: new ( ) ) ;
167
+ let e = self . maybe_recover_from_bad_qpath ( e, true ) ?;
168
+ let e = self . parse_dot_or_call_expr_with ( e, lo, attrs. into ( ) ) ?;
169
+ let e = self . parse_assoc_expr_with ( 0 , LhsExpr :: AlreadyParsed ( e) ) ?;
170
+ StmtKind :: Expr ( e)
171
+ } ;
169
172
Ok ( self . mk_stmt ( lo. to ( hi) , kind) )
170
173
}
171
174
0 commit comments