| 468 | } |
| 469 | |
| 470 | bool |
| 471 | EsiParser::_processWhenTag(const string &data, size_t curr_pos, size_t end_pos, DocNodeList &node_list) const |
| 472 | { |
| 473 | Attribute test_expr; |
| 474 | size_t term_pos; |
| 475 | if (!Utils::getAttribute(data, TEST_ATTR_STR, curr_pos, end_pos, test_expr, &term_pos, '>')) { |
| 476 | TSError("[%s] Could not find test attribute", __FUNCTION__); |
| 477 | return false; |
| 478 | } |
| 479 | ++term_pos; // go past the terminator |
| 480 | const char *data_start_ptr = data.data() + term_pos; |
| 481 | int data_size = end_pos - term_pos; |
| 482 | if (!_processSimpleContentTag(DocNode::TYPE_WHEN, data_start_ptr, data_size, node_list)) { |
| 483 | TSError("[%s] Could not parse when node's content", __FUNCTION__); |
| 484 | return false; |
| 485 | } |
| 486 | node_list.back().attr_list.push_back(test_expr); |
| 487 | Dbg(dbg_ctl, "[%s] Added when tag with expression [%.*s] and data starting with [%.5s]", __FUNCTION__, test_expr.value_len, |
| 488 | test_expr.value, data_start_ptr); |
| 489 | return true; |
| 490 | } |
| 491 | |
| 492 | bool |
| 493 | EsiParser::_processTryTag(const string &data, size_t curr_pos, size_t end_pos, DocNodeList &node_list) const |
nothing calls this directly
no test coverage detected