MCPcopy Create free account
hub / github.com/axmolengine/axmol / eval_string

Method eval_string

3rdparty/pugixml/pugixml.cpp:10846–11087  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10844 }
10845
10846 xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)
10847 {
10848 switch (_type)
10849 {
10850 case ast_string_constant:
10851 return xpath_string::from_const(_data.string);
10852
10853 case ast_func_local_name_0:
10854 {
10855 xpath_node na = c.n;
10856
10857 return xpath_string::from_const(local_name(na));
10858 }
10859
10860 case ast_func_local_name_1:
10861 {
10862 xpath_allocator_capture cr(stack.result);
10863
10864 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
10865 xpath_node na = ns.first();
10866
10867 return xpath_string::from_const(local_name(na));
10868 }
10869
10870 case ast_func_name_0:
10871 {
10872 xpath_node na = c.n;
10873
10874 return xpath_string::from_const(qualified_name(na));
10875 }
10876
10877 case ast_func_name_1:
10878 {
10879 xpath_allocator_capture cr(stack.result);
10880
10881 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
10882 xpath_node na = ns.first();
10883
10884 return xpath_string::from_const(qualified_name(na));
10885 }
10886
10887 case ast_func_namespace_uri_0:
10888 {
10889 xpath_node na = c.n;
10890
10891 return xpath_string::from_const(namespace_uri(na));
10892 }
10893
10894 case ast_func_namespace_uri_1:
10895 {
10896 xpath_allocator_capture cr(stack.result);
10897
10898 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
10899 xpath_node na = ns.first();
10900
10901 return xpath_string::from_const(namespace_uri(na));
10902 }
10903

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
string_valueClass · 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
translateFunction · 0.85

Tested by

no test coverage detected