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:
Artem Pavlenko 2018-07-02 15:07:41 +02:00
parent 7db6b0c9f0
commit 9d44a73ad0

View file

@ -315,14 +315,14 @@ namespace mapnik { namespace grammar {
auto const single_quoted_string = x3::rule<class single_quoted_string, std::string> {} = lit('\'')
>> no_skip[*(unesc_char[append]
|
//(lit('\\') > escaped_unicode[append]) // FIXME (!)
//|
(lit('\\') >> escaped_unicode[append])
|
(~char_('\''))[append])] > lit('\'');
auto const double_quoted_string = x3::rule<class double_quoted_string, std::string> {} = lit('"')
>> no_skip[*(unesc_char[append]
|
(lit('\\') > escaped_unicode[append])
(lit('\\') >> escaped_unicode[append])
|
(~char_('"'))[append])] > lit('"');