225 idx = result->size() + idx;
231 if(
static_cast<size_t>(idx) >= result->size())
236 <<
" is out of range. The allowed range is 1 to "
237 <<
static_cast<int>(result->size())
242 result = result->get_child(idx);
255 idx = result->size() / 2 + idx;
262 if(
static_cast<size_t>(idx) >= result->size())
267 <<
" is out of range. The allowed range is 1 to "
268 <<
static_cast<int>(result->size()) / 2
273 result = result->get_child(idx);
278 <<
"unsupported type "
279 << result->get_type()
280 <<
" for the 'array[<index>]' operation."
296 <<
"an integer, an identifier, or a string was expected as the index (defined in '[ ... ]'). A "
298 <<
" was not expected."
311 <<
"only an identifier is expected after a '.'."
324 std::string
const idx(index->get_string());
325 size_t const max_item(result->size());
326 if((max_item & 1) != 0)
328 throw csspp_exception_logic(
"expression.cpp:expression::post(): number of items in a map has to be even.");
331 for(
size_t j(0); j < max_item; j += 2)
336 throw csspp_exception_logic(
"expression.cpp:expression::post(): a map has the name of an entry which is not an identifier.");
338 if(item_name->get_string() == idx)
340 result = result->get_child(j + 1);
351 <<
"\"]' is not set."
359 <<
"unsupported left handside type "
360 << result->get_type()
361 <<
" for the '<map>.<identifier>' operation."