+ add 'wsp' delimiter support
+ re-arrange grammar a bit
This commit is contained in:
parent
b4e96c35b5
commit
97a9abc8f3
1 changed files with 5 additions and 8 deletions
|
@ -37,20 +37,17 @@ bool parse_dasharray(Iterator first, Iterator last, std::vector<double>& dasharr
|
|||
using qi::phrase_parse;
|
||||
using qi::_1;
|
||||
using qi::lit;
|
||||
using ascii::space;
|
||||
using qi::char_;
|
||||
using qi::no_skip;
|
||||
using phoenix::push_back;
|
||||
// SVG
|
||||
// dasharray ::= (length | percentage) (comma-wsp dasharray)?
|
||||
// no support for 'percentage' as viewport is unknown at load_map
|
||||
//
|
||||
bool r = phrase_parse(first, last,
|
||||
(
|
||||
lit("none") | (double_[push_back(phoenix::ref(dasharray), _1)]
|
||||
>> *(',' >> double_[push_back(phoenix::ref(dasharray), _1)]))
|
||||
)
|
||||
,
|
||||
space);
|
||||
|
||||
(double_[push_back(phoenix::ref(dasharray), _1)] % no_skip[char_(", ")] | lit("none")),
|
||||
qi::ascii::space);
|
||||
|
||||
if (first != last)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue