| 123456789101112131415161718192021222324252627282930 |
- // This file was generated using gyb. Do not edit it directly. Edit
- // SceneBuilder.swift.gyb instead.
- // swiftformat:options --allow-partial-wrapping true
- %{
- maximum_scene_count = 20
- }%
- /// Builds an app's root scene by composing other scenes together.
- @resultBuilder
- public struct SceneBuilder {
- /// A single scene doesn't need to get wrapped, simply pass it straight through.
- public static func buildBlock<Content: Scene>(_ content: Content) -> Content {
- return content
- }
- %for i in range(2, maximum_scene_count + 1):
- public static func buildBlock<
- ${", ".join("Scene%d: Scene" % j for j in range(i))}
- >(
- ${", ".join("_ scene%d: Scene%d" % (j, j) for j in range(i))}
- ) -> TupleScene${i}<
- ${", ".join("Scene%d" % j for j in range(i))}
- > {
- return TupleScene${i}(
- ${", ".join("scene%d" % j for j in range(i))}
- )
- }
- %end
- }
|