| 164 | } |
| 165 | |
| 166 | void array() { |
| 167 | if (m_char == '[') { |
| 168 | next(); |
| 169 | m_stream.beginArray(); |
| 170 | white(); |
| 171 | if (m_char == ']') { |
| 172 | next(); |
| 173 | m_stream.endArray(); |
| 174 | } else { |
| 175 | while (true) { |
| 176 | value(); |
| 177 | white(); |
| 178 | if (m_char == ']') { |
| 179 | next(); |
| 180 | m_stream.endArray(); |
| 181 | break; |
| 182 | } else if (m_char == ',') { |
| 183 | next(); |
| 184 | m_stream.putComma(); |
| 185 | white(); |
| 186 | } else if (m_char == 0) { |
| 187 | error("unexpected end of stream parsing array."); |
| 188 | } else { |
| 189 | error("bad array, should be ',' or ']'"); |
| 190 | } |
| 191 | } |
| 192 | } |
| 193 | } else { |
| 194 | error("bad array"); |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | void sequence() { |
| 199 | m_stream.beginArray(); |
nothing calls this directly
no test coverage detected