1 // rustfmt-format_macro_matchers: true
6 ($m1:ident, $m2:ident, $x:ident) => {};
7 ($($beginning:ident),*; $middle:ident; $($end:ident),*) => {};
12 $($beginning:ident),*;
16 ($name:ident($($dol:tt $var:ident)*) $($body:tt)*) => {};
18 $($i:ident : $ty:ty, $def:expr, $stb:expr, $($dstring:tt),+);+ $(;)*
19 $($i:ident : $ty:ty, $def:expr, $stb:expr, $($dstring:tt),+);+ $(;)*
21 ($foo:tt foo[$attr:meta] $name:ident) => {};
22 ($foo:tt[$attr:meta] $name:ident) => {};
23 ($foo:tt &'a[$attr:meta] $name:ident) => {};
24 ($foo:tt foo #[$attr:meta] $name:ident) => {};
25 ($foo:tt #[$attr:meta] $name:ident) => {};
26 ($foo:tt &'a #[$attr:meta] $name:ident) => {};
27 ($x:tt foo bar foo bar foo bar $y:tt => x * y * z $z:tt, $($a:tt),*) => {};
30 macro_rules! impl_a_method {
31 ($n:ident($a:ident : $ta:ty) -> $ret:ty { $body:expr }) => {
32 fn $n($a: $ta) -> $ret {
41 ($n:ident($a:ident : $ta:ty, $b:ident : $tb:ty) -> $ret:ty { $body:expr }) => {
42 fn $n($a: $ta, $b: $tb) -> $ret {
46 ($va: expr,$vb: expr) => {
52 $n:ident($a:ident : $ta:ty, $b:ident : $tb:ty, $c:ident : $tc:ty) -> $ret:ty { $body:expr }
54 fn $n($a: $ta, $b: $tb, $c: $tc) -> $ret {
58 ($va: expr,$vb: expr,$vc: expr) => {
64 $n:ident($a:ident : $ta:ty, $b:ident : $tb:ty, $c:ident : $tc:ty, $d:ident : $td:ty) ->
65 $ret:ty { $body:expr }
67 fn $n($a: $ta, $b: $tb, $c: $tc, $d: $td) -> $ret {
71 ($va: expr,$vb: expr,$vc: expr,$vd: expr) => {
72 $n($va, $vb, $vc, $vd)
80 ($expr:expr, $($func:ident)*) => {{
102 ($expr:expr, $($func:ident)*) => {{
126 this_line_is_98_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx();
133 this_line_is_99_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
141 this_line_is_100_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
149 this_line_is_101_characters_long_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(
158 $line0_xxxxxxxxxxxxxxxxx:expr,
159 $line1_xxxxxxxxxxxxxxxxx:expr,
160 $line2_xxxxxxxxxxxxxxxxx:expr,
161 $line3_xxxxxxxxxxxxxxxxx:expr,
166 // Skip formatting `macro_rules!` that are not using `{}`.
175 macro foo($type_name:ident, $docs:expr) {
176 #[allow(non_camel_case_types)]
178 #[derive(Debug, Clone, Copy)]
179 pub struct $type_name;
184 ($a:ident : $b:ty) => {};
185 ($a:ident $b:ident $c:ident) => {};
189 macro_rules! add_message_to_notes {
191 let mut lines = message.lines();
192 notes.push_str(&format!("\n{}: {}", level, lines.next().unwrap()));
194 notes.push_str(&format!(
195 "\n{:indent$}{line}",
197 indent = level.len() + 2,
205 macro_rules! binary {
206 ($_self:ident, $expr:expr, $lhs:expr, $func:ident) => {
207 while $_self.matched($expr) {
208 let op = $_self.get_binary_op()?;
210 let rhs = Box::new($_self.$func()?);
213 span: $lhs.get_span().to(rhs.get_span()),
214 value: Expression::Binary {
227 ($($foo:expr)()?) => {};
236 macro_rules! __wundergraph_expand_sqlite_mutation {
238 $mutation_name:ident $((context = $($context:tt)*))* {
241 $(insert = $insert:ident,)*
242 $(update = $update:ident,)*
243 $(delete = $($delete:tt)+)*
255 config = ::common_bench::reduced_samples();
262 macro_rules! save_regs {
273 :::: "intel", "volatile");
278 macro_rules! impl_as_byte_slice_arrays {
280 ($n:expr, $N:ident, $($NN:ident,)*) => {
281 impl_as_byte_slice_arrays!($n - 1, $($NN,)*);
283 impl<T> AsByteSliceMut for [T; $n] where [T]: AsByteSliceMut {
284 fn as_byte_slice_mut(&mut self) -> &mut [u8] {
285 self[..].as_byte_slice_mut()
288 fn to_le(&mut self) {
293 (!div $n:expr,) => {};
294 (!div $n:expr, $N:ident, $($NN:ident,)*) => {
295 impl_as_byte_slice_arrays!(!div $n / 2, $($NN,)*);
297 impl<T> AsByteSliceMut for [T; $n] where [T]: AsByteSliceMut {
298 fn as_byte_slice_mut(&mut self) -> &mut [u8] {
299 self[..].as_byte_slice_mut()
302 fn to_le(&mut self) {
312 macro_rules! touch_value {
313 ($func:ident, $value:expr) => {{
314 let result = API::get_cached().$func(
318 ffi::VSPropAppendMode::paTouch,
320 let result = API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppend);
322 API::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendM);
324 APIIIIIIIII::get_cached().$func(self, key.as_ptr(), $value, ffi::VSPropAppendM);
325 let result = API::get_cached().$func(
329 ffi::VSPropAppendMMMMMMMMMM,
331 debug_assert!(result == 0);
338 macro_rules! template {
351 macro_rules! template {