Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let document = Document { | |
| var v0:[DocumentElement] | |
| var v0_array:[[DocumentElement]] = [] | |
| for index in 1...3 { | |
| let v0_0 = Label(text: "Section \(index)").size(.subtitle) | |
| let v0_1 = Label(text: "A text").size(.body) | |
| //v0_block is [DocumentElement] | |
| let v0_block = MultipleChildBuilder.buildBlock(v0_0, v0_1) | |
| //added to [[DocumentElement]] that holds all interaction | |
| v0_array.append(v0_block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let document = Document { | |
| var v0: [DocumentElement] | |
| switch value { | |
| case 1: | |
| let v0_0 = Label(text: "Line 1") | |
| let v0_block = MultipleChildBuilder.buildBlock(v0_0) | |
| v0 = MultipleChildBuilder | |
| .buildEither(first:MultipleChildBuilder. | |
| .buildEither(first: v0_0)) | |
| case 2: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let document = Document { | |
| var v0: [DocumentElement] | |
| if hasLogo { | |
| v0_0 = Logo(imageName: "CompanyLogo.png") | |
| v0_block = MultipleChildBuilder.buildBlock(v0_0) | |
| v0 = MultipleChildBuilder.buildEither(first:v0_block) | |
| } else { | |
| v0_0 = Label(text:"Title").size(.title) | |
| v0_block = MultipleChildBuilder.buildBlock(v0_0) | |
| v0 = MultipleChildBuilder.buildEither(second:v0_block) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let document = Document { | |
| var v0: [DocumentElement] | |
| if hasLogo { | |
| let v0_1 = Logo(imageName: "CompanyLogo.png") | |
| let v0_block = MultipleChildBuilder.buildBlock(v0_1) | |
| v0 = MultipleChildBuilder.buildOptional(v0_block) | |
| } | |
| //v0 was not initialized if hasLogo is false!!!! | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let document = Document { | |
| var v0: [DocumentElement] | |
| if hasLogo { | |
| let v0_1 = Logo(imageName: "CompanyLogo.png") | |
| let v0_block = MultipleChildBuilder.buildBlock(v0_1) | |
| v0 = MultipleChildBuilder.buildOptional(v0_block) | |
| } | |
| else { //The else is added by the compiler | |
| v0 = MultipleChildBuilder.buildOptional(nil) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let document = Document.init(content: { | |
| let v0 = Logo(imageName: "CompanyLogo.png") | |
| let v1 = Label(text:"A line of text") | |
| let v2 = Label(text:"Another line of text") | |
| return MultipleChildBuilder.buildBlock(v0,v1,v2) | |
| }) |
NewerOlder