(depth int)
| 348 | } |
| 349 | |
| 350 | func conditionalNode(depth int) string { |
| 351 | return oneOf(list[string]{ |
| 352 | {fmt.Sprintf("if %v { %v } else { %v }", node(depth-1), node(depth-1), node(depth-1)), 100}, |
| 353 | {fmt.Sprintf("if %v { %v } else %v", node(depth-1), node(depth-1), node(depth-1)), 100}, |
| 354 | {fmt.Sprintf("%v ? %v : %v", node(depth-1), node(depth-1), node(depth-1)), 100}, |
| 355 | {fmt.Sprintf("%v ?: %v", node(depth-1), node(depth-1)), 20}, |
| 356 | }) |
| 357 | } |
| 358 | |
| 359 | func sequenceNode(depth int) string { |
| 360 | var items []string |