Macro rerast_macros::replace [] [src]

macro_rules! replace {
    ($a:expr => $b:expr) => { ... };
}

Invocations of this macro instruct Rerast to replace the first expression/statement with the one after the =>. For example replace!(5 => 6) says to replace all occurences of the literal 5 with the literal 6.

The macro should be invoked inside a function definition. The arguments to the function represent placeholders within the search and replace expressions.