| 1 | macro_rules! editor_config { |
| 2 | ( |
| 3 | impl $ty:ty { |
| 4 | $( |
| 5 | $field:ident => { |
| 6 | label: $label:literal, |
| 7 | kind: $kind:ident |
| 8 | $(, values: [$($value:literal),* $(,)?])? |
| 9 | $(, optional: $optional:literal)? |
| 10 | $(, nested: $nested:ty)? |
| 11 | $(, default: $default:ty)? |
| 12 | $(, list: $list:expr)? |
| 13 | $(, tagged_union: $tagged_union:expr)? |
| 14 | $(,)? |
| 15 | } |
| 16 | ),* $(,)? |
| 17 | } |
| 18 | ) => { ... }; |
| 19 | (@kind Boolean) => { ... }; |
| 20 | (@kind String) => { ... }; |
| 21 | (@kind Integer) => { ... }; |
| 22 | (@kind Float) => { ... }; |
| 23 | (@kind Enum) => { ... }; |
| 24 | (@kind StringMap) => { ... }; |
| 25 | (@kind Json) => { ... }; |
| 26 | (@kind List) => { ... }; |
| 27 | (@kind TaggedUnion) => { ... }; |
| 28 | (@kind Section) => { ... }; |
| 29 | (@values) => { ... }; |
| 30 | (@values $($value:literal),*) => { ... }; |
| 31 | (@optional) => { ... }; |
| 32 | (@optional $optional:literal) => { ... }; |
| 33 | (@nested) => { ... }; |
| 34 | (@nested $nested:ty) => { ... }; |
| 35 | (@default) => { ... }; |
| 36 | (@default $default:ty) => { ... }; |
| 37 | (@list) => { ... }; |
| 38 | (@list $list:expr) => { ... }; |
| 39 | (@tagged_union) => { ... }; |
| 40 | (@tagged_union $tagged_union:expr) => { ... }; |
| 41 | } |