MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / array

Method array

source/core/StarJsonParser.hpp:166–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers

nothing calls this directly

Calls 5

valueClass · 0.85
errorFunction · 0.85
beginArrayMethod · 0.45
endArrayMethod · 0.45
putCommaMethod · 0.45

Tested by

no test coverage detected