@@ -655,6 +655,8 @@ end = struct (* {{{ *)
655655 error ~loc (" illegal attribute " ^ show_raw_attribute a) in
656656 let illegal_replace s =
657657 error ~loc (" replacing clause for " ^ s ^ " cannot have a name attribute" ) in
658+ let illegal_remove_id s =
659+ error ~loc (" remove clause for " ^ s ^ " cannot have a name attribute" ) in
658660 let rec aux_attrs r = function
659661 | [] -> r
660662 | Name s :: rest ->
@@ -669,6 +671,9 @@ end = struct (* {{{ *)
669671 | Replace s :: rest ->
670672 if r.insertion <> None then duplicate_err " insertion" ;
671673 aux_attrs { r with insertion = Some (Replace s) } rest
674+ | Remove s :: rest ->
675+ if r.insertion <> None then duplicate_err " insertion" ;
676+ aux_attrs { r with insertion = Some (Remove s) } rest
672677 | If s :: rest ->
673678 if r.ifexpr <> None then duplicate_err " if" ;
674679 aux_attrs { r with ifexpr = Some s } rest
@@ -678,6 +683,7 @@ end = struct (* {{{ *)
678683 begin
679684 match attributes.insertion, attributes.id with
680685 | Some (Replace x ), Some _ -> illegal_replace x
686+ | Some (Remove x ), Some _ -> illegal_remove_id x
681687 | _ -> ()
682688 end ;
683689 { c with Clause. attributes }
@@ -694,7 +700,7 @@ end = struct (* {{{ *)
694700 | If s :: rest ->
695701 if r.cifexpr <> None then duplicate_err " if" ;
696702 aux_chr { r with cifexpr = Some s } rest
697- | (Before _ | After _ | Replace _ | External | Index _ ) as a :: _ -> illegal_err a
703+ | (Before _ | After _ | Replace _ | Remove _ | External | Index _ ) as a :: _ -> illegal_err a
698704 in
699705 let cid = Loc. show loc in
700706 { c with Chr. attributes = aux_chr { cid; cifexpr = None } attributes }
@@ -725,7 +731,7 @@ end = struct (* {{{ *)
725731 | Some (Structured. Index _ ) -> duplicate_err " index"
726732 | Some _ -> error ~loc " external predicates cannot be indexed"
727733 end
728- | (Before _ | After _ | Replace _ | Name _ | If _ ) as a :: _ -> illegal_err a
734+ | (Before _ | After _ | Replace _ | Remove _ | Name _ | If _ ) as a :: _ -> illegal_err a
729735 in
730736 let attributes = aux_tatt None attributes in
731737 let attributes =
@@ -2225,7 +2231,7 @@ let rec constants_of acc = function
22252231let w_symbol_table s f x =
22262232 let table = Symbols. compile_table @@ State. get Symbols. table s in
22272233 let pp_ctx = { table; uv_names = ref (IntMap. empty,0 ) } in
2228- Util. set_spaghetti_printer Data. pp_const (R.Pp. pp_constant ~pp_ctx );
2234+ Util. set_spaghetti_printer pp_const (R.Pp. pp_constant ~pp_ctx );
22292235 f x
22302236
22312237(* Compiler passes *)
0 commit comments