struc reequ value { local tmp
tmp equ value ; preserve value for case where "restore ." will trash parts of value
restore .
. equ tmp }
macro redefine statement { local tmp,tmp2
tmp equ
tmp2 equ
irps n,statement \{
match any,tmp \\{ tmp2 equ tmp2 \n \\}
match ,tmp \\{ define tmp n\\} \}
match tmp3,tmp \{
match tmp4,tmp2 \\{
restore tmp3
define tmp3 tmp4 \\} \} }
test both of them - works(tested on macroset "struct" where previous value used as part of reequalition/redefinition - in "endp" macro when "match any, sub@struct" tested - content of match block replaced with "redefine field@struct field@struct>" & "field@struct reequ field@struct>").
but maybe second one could be simplified?