@@ -874,11 +874,12 @@ local_label_names:
874874| IDENT COMMA local_label_names { fst $1 :: $3 }
875875;
876876
877-
878-
879877statement :
880- SEMICOLON {NOP ((*handleLoc*) $1) }
881- | comma_expression SEMICOLON
878+ | attribute_nocv_list SEMICOLON {NOP ((*handleLoc*) $2) }
879+ | statement_no_null { $1 }
880+
881+ statement_no_null :
882+ comma_expression SEMICOLON
882883 {COMPUTATION (smooth_expression (fst $1), joinLoc (snd $1) $2)}
883884| block {BLOCK (fst3 $1, joinLoc (snd3 $1) (trd3 $1))}
884885| IF paren_comma_expression location statement location %prec IF
@@ -894,12 +895,18 @@ statement:
894895| FOR LPAREN for_clause opt_expression
895896 SEMICOLON opt_expression RPAREN statement location
896897 {FOR ($3, $4, $6, $8, joinLoc $1 $9, joinLoc $2 $7)}
897- | IDENT COLON attribute_nocv_list location statement
898+ | IDENT COLON attribute_nocv_list location statement_no_null
898899 {(* The only attribute that should appear here
899900 is "unused". For now, we drop this on the
900901 floor, since unused labels are usually
901902 removed anyways by Rmtmps. *)
902903 LABEL (fst $1, $5, joinLoc (snd $1) $4)}
904+ | IDENT COLON attribute_nocv_list location SEMICOLON
905+ {(* The only attribute that should appear here
906+ is "unused". For now, we drop this on the
907+ floor, since unused labels are usually
908+ removed anyways by Rmtmps. *)
909+ LABEL (fst $1, NOP ($5), joinLoc (snd $1) $4)}
903910| CASE expression COLON statement location
904911 {CASE (fst $2, $4, joinLoc $1 $5, joinLoc $1 $3)}
905912| CASE expression ELLIPSIS expression COLON statement location
0 commit comments