(ParserUtils.StringPosition source)
| 68 | } |
| 69 | |
| 70 | static int parseInt(ParserUtils.StringPosition source) { |
| 71 | int start = source.position; |
| 72 | int result = 0; |
| 73 | while (source.position < source.length) { |
| 74 | char ch = source.value.charAt(source.position); |
| 75 | if (!Character.isDigit(ch)) { |
| 76 | break; |
| 77 | } |
| 78 | result = result * 10 + (ch - '0'); |
| 79 | source.position += 1; |
| 80 | } |
| 81 | if (source.position == start) { |
| 82 | throw new IllegalArgumentException("Missing integer at " + source); |
| 83 | } |
| 84 | return result; |
| 85 | } |
| 86 | |
| 87 | public static String parseName(ParserUtils.StringPosition source) { |
| 88 | if (source.position == source.length) { |
no outgoing calls
no test coverage detected