| 288 | } |
| 289 | |
| 290 | static void TrySkipValue(GLTFPropsParser& propsParser) |
| 291 | { |
| 292 | auto nextNode = propsParser.PeekNext(); |
| 293 | |
| 294 | if (nextNode.mKind == GLTFPropsParser::NodeKind_LBracket) |
| 295 | { |
| 296 | propsParser.GetNext(); |
| 297 | propsParser.GetNext(); |
| 298 | propsParser.GetNext(); |
| 299 | nextNode = propsParser.PeekNext(); |
| 300 | } |
| 301 | |
| 302 | if (nextNode.mKind == GLTFPropsParser::NodeKind_Equals) |
| 303 | { |
| 304 | propsParser.GetNext(); |
| 305 | |
| 306 | int depth = 0; |
| 307 | do |
| 308 | { |
| 309 | auto node = propsParser.GetNext(); |
| 310 | if (node.mKind == GLTFPropsParser::NodeKind_End) |
| 311 | return; |
| 312 | if (node.mKind == GLTFPropsParser::NodeKind_LBrace) |
| 313 | depth++; |
| 314 | else if (node.mKind == GLTFPropsParser::NodeKind_RBrace) |
| 315 | depth--; |
| 316 | if (node.mKind == GLTFPropsParser::NodeKind_LBracket) |
| 317 | depth++; |
| 318 | if (node.mKind == GLTFPropsParser::NodeKind_LBracket) |
| 319 | depth--; |
| 320 | } while (depth > 0); |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | static bool ExpectIndex(GLTFPropsParser& propsParser, int& idx) |
| 325 | { |
no test coverage detected