mirror of
https://github.com/git/git
synced 2024-11-05 18:59:29 +00:00
29 lines
280 B
Text
29 lines
280 B
Text
|
@ swap_with_declaration @
|
||
|
type T;
|
||
|
identifier tmp;
|
||
|
T a, b;
|
||
|
@@
|
||
|
- T tmp = a;
|
||
|
+ T tmp;
|
||
|
+ tmp = a;
|
||
|
a = b;
|
||
|
b = tmp;
|
||
|
|
||
|
@ swap @
|
||
|
type T;
|
||
|
T tmp, a, b;
|
||
|
@@
|
||
|
- tmp = a;
|
||
|
- a = b;
|
||
|
- b = tmp;
|
||
|
+ SWAP(a, b);
|
||
|
|
||
|
@ extends swap @
|
||
|
identifier unused;
|
||
|
@@
|
||
|
{
|
||
|
...
|
||
|
- T unused;
|
||
|
... when != unused
|
||
|
}
|