MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / eval_string

Method eval_string

lib/pugixml/src/pugixml.cpp:10639–10880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10637 }
10638
10639 xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)
10640 {
10641 switch (_type)
10642 {
10643 case ast_string_constant:
10644 return xpath_string::from_const(_data.string);
10645
10646 case ast_func_local_name_0:
10647 {
10648 xpath_node na = c.n;
10649
10650 return xpath_string::from_const(local_name(na));
10651 }
10652
10653 case ast_func_local_name_1:
10654 {
10655 xpath_allocator_capture cr(stack.result);
10656
10657 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
10658 xpath_node na = ns.first();
10659
10660 return xpath_string::from_const(local_name(na));
10661 }
10662
10663 case ast_func_name_0:
10664 {
10665 xpath_node na = c.n;
10666
10667 return xpath_string::from_const(qualified_name(na));
10668 }
10669
10670 case ast_func_name_1:
10671 {
10672 xpath_allocator_capture cr(stack.result);
10673
10674 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
10675 xpath_node na = ns.first();
10676
10677 return xpath_string::from_const(qualified_name(na));
10678 }
10679
10680 case ast_func_namespace_uri_0:
10681 {
10682 xpath_node na = c.n;
10683
10684 return xpath_string::from_const(namespace_uri(na));
10685 }
10686
10687 case ast_func_namespace_uri_1:
10688 {
10689 xpath_allocator_capture cr(stack.result);
10690
10691 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
10692 xpath_node na = ns.first();
10693
10694 return xpath_string::from_const(namespace_uri(na));
10695 }
10696

Callers 5

compare_eqMethod · 0.80
eval_booleanMethod · 0.80
eval_numberMethod · 0.80
eval_string_concatMethod · 0.80
evaluate_stringMethod · 0.80

Calls 15

local_nameFunction · 0.85
qualified_nameFunction · 0.85
namespace_uriFunction · 0.85
find_substringFunction · 0.85
from_heapFunction · 0.85
xpath_stringFunction · 0.85
round_nearestFunction · 0.85
is_nanFunction · 0.85
normalize_spaceFunction · 0.85
from_heap_preallocatedFunction · 0.85
translate_tableFunction · 0.85
eval_node_setMethod · 0.80

Tested by

no test coverage detected