fix - add single quoted string escaped chars support + allow backtracking when escaped characters are not part of /u, /U. /x encodings (ref 3433397c30 (commitcomment-29512684)
)
This commit is contained in:
parent
7db6b0c9f0
commit
9d44a73ad0
1 changed files with 3 additions and 3 deletions
|
@ -315,14 +315,14 @@ namespace mapnik { namespace grammar {
|
||||||
auto const single_quoted_string = x3::rule<class single_quoted_string, std::string> {} = lit('\'')
|
auto const single_quoted_string = x3::rule<class single_quoted_string, std::string> {} = lit('\'')
|
||||||
>> no_skip[*(unesc_char[append]
|
>> no_skip[*(unesc_char[append]
|
||||||
|
|
|
|
||||||
//(lit('\\') > escaped_unicode[append]) // FIXME (!)
|
(lit('\\') >> escaped_unicode[append])
|
||||||
//|
|
|
|
||||||
(~char_('\''))[append])] > lit('\'');
|
(~char_('\''))[append])] > lit('\'');
|
||||||
|
|
||||||
auto const double_quoted_string = x3::rule<class double_quoted_string, std::string> {} = lit('"')
|
auto const double_quoted_string = x3::rule<class double_quoted_string, std::string> {} = lit('"')
|
||||||
>> no_skip[*(unesc_char[append]
|
>> no_skip[*(unesc_char[append]
|
||||||
|
|
|
|
||||||
(lit('\\') > escaped_unicode[append])
|
(lit('\\') >> escaped_unicode[append])
|
||||||
|
|
|
|
||||||
(~char_('"'))[append])] > lit('"');
|
(~char_('"'))[append])] > lit('"');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue