(depth int)
| 357 | } |
| 358 | |
| 359 | func sequenceNode(depth int) string { |
| 360 | var items []string |
| 361 | for i := 0; i < oneOf(list[int]{ |
| 362 | {2, 50}, |
| 363 | {3, 25}, |
| 364 | }); i++ { |
| 365 | items = append(items, node(depth-1)) |
| 366 | } |
| 367 | if maybe() { |
| 368 | return strings.Join(items, "; ") |
| 369 | } |
| 370 | return fmt.Sprintf("(%v)", strings.Join(items, ", ")) |
| 371 | } |
| 372 | |
| 373 | func variableNode(depth int) string { |
| 374 | // Generate 1-3 variable declarations with diverse names and then make sure |