本文整理汇总了C++中Traits::skip_space方法的典型用法代码示例。如果您正苦于以下问题:C++ Traits::skip_space方法的具体用法?C++ Traits::skip_space怎么用?C++ Traits::skip_space使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Traits
的用法示例。
在下文中一共展示了Traits::skip_space方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: match_initializer
double match_initializer(iterator& current, iterator end)
{
traits.skip_space(current, end);
if(!traits.match(current, end, "{")) return 0.0;
double res = match_params(current, end);
if(res == 0.0) return 0.0;
traits.skip_space(current, end);
if(!traits.match(current, end, "}")) return 0.0;
traits.skip_space(current, end);
return res;
}
示例2: match_explicit
double match_explicit(iterator& current, iterator end)
{
traits.skip_space(current, end);
if(!traits.match_skip_space(
current,
end,
traits.get_shared_string(shared_data, type_name)
)) return 0.0;
traits.skip_space(current, end);
if(!traits.match(current, end, "(")) return 0.0;
if(match_params(current, end) == 0.0) return 0.0;
traits.skip_space(current, end);
if(!traits.match(current, end, ")")) return 0.0;
traits.skip_space(current, end);
return 1.0;
}
示例3: match_params
double match_params(iterator& current, iterator end)
{
double result = 1.0;
auto i = this->subparsers.begin(), e = this->subparsers.end();
while(i != e)
{
traits.skip_space(current, end);
result *= (*i)->match(current, end);
if(result == 0.0) return 0.0;
traits.skip_space(current, end);
++i;
if(i != e)
{
if(!traits.match(current, end, ","))
return 0.0;
traits.skip_space(current, end);
}
}
return result;
}
示例4: match
double match(iterator& begin, iterator end)
{
iterator current = begin;
double result = match_explicit(current, end);
if(result == 0.0)
{
current = begin;
result = match_initializer(current, end);
if(result == 0.0)
{
if(this->subparsers.size() == 1)
{
current = begin;
result = match_params(current, end);
}
if(result == 0.0) return 0.0;
}
}
traits.skip_space(current, end);
begin = current;
return result;
}