本文整理汇总了C++中Complex_Selector::has_placeholder方法的典型用法代码示例。如果您正苦于以下问题:C++ Complex_Selector::has_placeholder方法的具体用法?C++ Complex_Selector::has_placeholder怎么用?C++ Complex_Selector::has_placeholder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Complex_Selector
的用法示例。
在下文中一共展示了Complex_Selector::has_placeholder方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
Selector* Contextualize::operator()(Complex_Selector* s)
{
To_String to_string(&ctx);
Complex_Selector* ss = new (ctx.mem) Complex_Selector(*s);
// ss->last_block(s->last_block());
// ss->media_block(s->media_block());
Compound_Selector* new_head = 0;
Complex_Selector* new_tail = 0;
if (ss->head()) {
new_head = static_cast<Compound_Selector*>(s->head()->perform(this));
ss->head(new_head);
}
if (ss->tail()) {
new_tail = static_cast<Complex_Selector*>(s->tail()->perform(this));
// new_tail->last_block(s->last_block());
// new_tail->media_block(s->media_block());
ss->tail(new_tail);
}
if ((new_head && new_head->has_placeholder()) || (new_tail && new_tail->has_placeholder())) {
ss->has_placeholder(true);
}
else {
ss->has_placeholder(false);
}
if (!ss->head() && ss->combinator() == Complex_Selector::ANCESTOR_OF) {
return ss->tail();
}
else {
return ss;
}
}