MCPcopy Create free account
hub / github.com/MyGUI/mygui / eval_string

Method eval_string

Tools/EditorFramework/pugixml.cpp:9121–9339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9119 }
9120
9121 xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)
9122 {
9123 switch (_type)
9124 {
9125 case ast_string_constant: return xpath_string_const(_data.string);
9126
9127 case ast_func_local_name_0:
9128 {
9129 xpath_node na = c.n;
9130
9131 return xpath_string_const(local_name(na));
9132 }
9133
9134 case ast_func_local_name_1:
9135 {
9136 xpath_allocator_capture cr(stack.result);
9137
9138 xpath_node_set_raw ns = _left->eval_node_set(c, stack);
9139 xpath_node na = ns.first();
9140
9141 return xpath_string_const(local_name(na));
9142 }
9143
9144 case ast_func_name_0:
9145 {
9146 xpath_node na = c.n;
9147
9148 return xpath_string_const(qualified_name(na));
9149 }
9150
9151 case ast_func_name_1:
9152 {
9153 xpath_allocator_capture cr(stack.result);
9154
9155 xpath_node_set_raw ns = _left->eval_node_set(c, stack);
9156 xpath_node na = ns.first();
9157
9158 return xpath_string_const(qualified_name(na));
9159 }
9160
9161 case ast_func_namespace_uri_0:
9162 {
9163 xpath_node na = c.n;
9164
9165 return xpath_string_const(namespace_uri(na));
9166 }
9167
9168 case ast_func_namespace_uri_1:
9169 {
9170 xpath_allocator_capture cr(stack.result);
9171
9172 xpath_node_set_raw ns = _left->eval_node_set(c, stack);
9173 xpath_node na = ns.first();
9174
9175 return xpath_string_const(namespace_uri(na));
9176 }
9177
9178 case ast_func_string_0: return string_value(c.n, stack.result);

Callers 5

compare_eqMethod · 0.45
eval_booleanMethod · 0.45
eval_numberMethod · 0.45
eval_string_concatMethod · 0.45

Calls 15

local_nameFunction · 0.70
qualified_nameFunction · 0.70
namespace_uriFunction · 0.70
find_substringFunction · 0.70
xpath_stringFunction · 0.70
round_nearestFunction · 0.70
is_nanFunction · 0.70
normalize_spaceFunction · 0.70
translateFunction · 0.70
eval_node_setMethod · 0.45
firstMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected