| 528 | } |
| 529 | |
| 530 | Error VariantParser::_parse_enginecfg(Stream *p_stream, Vector<String> &strings, int &line, String &r_err_str) { |
| 531 | Token token; |
| 532 | get_token(p_stream, token, line, r_err_str); |
| 533 | if (token.type != TK_PARENTHESIS_OPEN) { |
| 534 | r_err_str = "Expected '(' in old-style project.godot construct"; |
| 535 | return ERR_PARSE_ERROR; |
| 536 | } |
| 537 | |
| 538 | String accum; |
| 539 | |
| 540 | while (true) { |
| 541 | char32_t c = p_stream->get_char(); |
| 542 | |
| 543 | if (p_stream->is_eof()) { |
| 544 | r_err_str = "Unexpected EOF while parsing old-style project.godot construct"; |
| 545 | return ERR_PARSE_ERROR; |
| 546 | } |
| 547 | |
| 548 | if (c == ',') { |
| 549 | strings.push_back(accum.strip_edges()); |
| 550 | accum = String(); |
| 551 | } else if (c == ')') { |
| 552 | strings.push_back(accum.strip_edges()); |
| 553 | return OK; |
| 554 | } else if (c == '\n') { |
| 555 | line++; |
| 556 | } |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | template <typename T> |
| 561 | Error VariantParser::_parse_construct(Stream *p_stream, Vector<T> &r_construct, int &line, String &r_err_str) { |
nothing calls this directly
no test coverage detected