131 <<
"Unexpected closing block of type: " << n->get_type() <<
"."
138 result->add_child(n);
165 result->add_child(q);
177 <<
"HTML comment delimiters (<!-- and -->) are not allowed in this CSS document."
187 <<
"Unexpected closing block of type: " << n->get_type() <<
"."
215 <<
"At '@' command cannot be empty (missing expression or block) unless ended by a semicolon (;)."
230 <<
"At '@' command must end with a block or a ';'."
233 at_keyword->take_over_children_of(n);
254 <<
"A qualified rule cannot end a { ... } block with a ';'."
267 <<
"A qualified rule cannot be empty; you are missing a { ... } block."
277 <<
"A qualified rule must end with a { ... } block."
326 <<
"the end of the stream was not reached in this declaration, we stopped on a "
338 result->set_string(identifier->get_string());
357 <<
"':' missing in your declaration starting with \""
358 << identifier->get_string()
374 result->add_child(list);
404 list->remove_child(0);
408 list->remove_child(list->size() - 1);
415 if((flags & g_component_value_flag_return_on_variable) != 0
425 result->add_child(list);
443 list->remove_child(list->get_last_child());
448 n->set_string(exclamation->get_string());
465 <<
"A '!' must be followed by an identifier, got a "
466 << exclamation->get_type()
480 list->remove_child(list->size() - 1);
508 list->remove_child(0);
529 <<
"Variable set to a block and a nested property block must end with a semicolon (;) after said block."
542 list->remove_child(0);
546 list->remove_child(list->size() - 1);
551 result->remove_child(list);
554 if(result->size() == 1)
556 result = result->get_last_child();
593 b->take_over_children_of(children);
606 <<
"Block expected to end with "
625 b->add_child(children);
638 <<
"Block expected to end with "
653 <<
"Block expected to end with "
750 switch(n->get_child(pos)->get_type())
803 size_t const max_children(n->size());
808 temp->take_over_children_of(n);
811 arg->set_integer(
static_cast<integer_t>(separator));
814 for(
size_t i(0); i < max_children; ++i)
819 if(i + 1 != max_children)
821 throw csspp_exception_logic(
"compiler.cpp:compiler::argify(): list that has an OPEN_CURLYBRACKET that is not the last child.");
826 if(child->is(separator))
832 arg->remove_child(arg->get_last_child());
839 <<
"dangling comma at the beginning of a list of arguments or selectors."
845 <<
"two commas in a row are invalid in a list of arguments or selectors."
850 if(i + 1 == max_children
854 <<
"dangling comma at the end of a list of arguments or selectors."
860 arg->set_integer(
static_cast<integer_t>(separator));
865 arg->add_child(child);
static error & instance()
std::shared_ptr< lexer > pointer_t
std::shared_ptr< node > pointer_t
node::pointer_t declaration_list()
node::pointer_t stylesheet()
parser(lexer::pointer_t l)
node::pointer_t at_rule(node::pointer_t at_keyword)
node::pointer_t component_value_list()
static bool argify(node::pointer_t n, node_type_t const separator=node_type_t::COMMA)
node::pointer_t next_token()
node::pointer_t qualified_rule(node::pointer_t n)
node::pointer_t declaration(node::pointer_t identifier)
static bool is_nested_declaration(node::pointer_t n)
node::pointer_t f_last_token
node::pointer_t block_list(node::pointer_t b)
node::pointer_t rule_list()
node::pointer_t block(node::pointer_t b, node_type_t closing_token)
node::pointer_t component_value()
static bool is_variable_set(node::pointer_t n, bool with_block)
int const g_component_value_flag_return_on_semi_colon
int const g_component_value_flag_return_on_variable
The namespace of all the classes in the CSS Preprocessor.