(String s)
| 344 | } |
| 345 | |
| 346 | private static int newlines(String s) { |
| 347 | int n = 0; |
| 348 | for (int i = 0; i < s.length(); i++) { |
| 349 | if (s.charAt(i) == '\n') { |
| 350 | n++; |
| 351 | } |
| 352 | } |
| 353 | return n; |
| 354 | } |
| 355 | |
| 356 | // A trivial struct-like class with Starlark fields defined by a map. |
| 357 | private static class Struct implements StarlarkValue, Structure { |