difftreelog
fix parser should accept escapes of any string type
in: master
1 file changed
crates/jrsonnet-parser/src/lib.rsdiffbeforeafterboth113 / "\\\\"113 / "\\\\"114 / "\\u" hex_char() hex_char() hex_char() hex_char()114 / "\\u" hex_char() hex_char() hex_char() hex_char()115 / "\\x" hex_char() hex_char()115 / "\\x" hex_char() hex_char()116 / ['\\'] (quiet! { ['b' | 'f' | 'n' | 'r' | 't'] / c() } / expected!("<escape character>"))116 / ['\\'] (quiet! { ['b' | 'f' | 'n' | 'r' | 't' | '"' | '\''] } / expected!("<escape character>"))117 pub rule string() -> String117 pub rule string() -> String118 = ['"'] str:$(string_char(<"\"">)*) ['"'] {? unescape::unescape(str).ok_or("<escaped string>")}118 = ['"'] str:$(string_char(<"\"">)*) ['"'] {? unescape::unescape(str).ok_or("<escaped string>")}119 / ['\''] str:$(string_char(<"\'">)*) ['\''] {? unescape::unescape(str).ok_or("<escaped string>")}119 / ['\''] str:$(string_char(<"\'">)*) ['\''] {? unescape::unescape(str).ok_or("<escaped string>")}