File tree Expand file tree Collapse file tree 3 files changed +35
-2
lines changed
Expand file tree Collapse file tree 3 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ node_modules/
77build /
88dist /
99.vscode /tasks.json
10+ examples /test.eve
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ parser!(number(state) -> Node<'a> {
7171
7272whitespace_parser ! ( escaped_quote( state) -> Node <' a> {
7373 tag!( state, "\\ " ) ;
74- let escaped = alt_tag!( state, [ "\" " "n" "t" ] ) ;
74+ let escaped = alt_tag!( state, [ "\" " "\\ " " n" "t" ] ) ;
7575 let ch = match escaped {
7676 "n" => "\n " ,
7777 "t" => "\t " ,
@@ -94,7 +94,7 @@ whitespace_parser!(string_bracket(state) -> Node<'a> {
9494} ) ;
9595
9696whitespace_parser ! ( string_chars( state) -> Node <' a> {
97- let chars = any_except!( state, "\" {" ) ;
97+ let chars = any_except!( state, "\\ \ " {" ) ;
9898 result!( state, Node :: RawString ( chars) )
9999} ) ;
100100
Original file line number Diff line number Diff line change @@ -251,6 +251,38 @@ test!(base_join_nested_record, {
251251 end
252252} ) ;
253253
254+ //--------------------------------------------------------------------
255+ // Strings
256+ //--------------------------------------------------------------------
257+
258+ test ! ( base_string, {
259+ search
260+ baz = "Hello"
261+ bind
262+ [ #foo baz]
263+ end
264+
265+ search
266+ [ #foo baz: "Hello" ]
267+ bind
268+ [ #success]
269+ end
270+ } ) ;
271+
272+ test ! ( base_string_escape_chars, {
273+ search
274+ baz = "Hello \\ \n \" World\" "
275+ bind
276+ [ #foo baz]
277+ end
278+
279+ search
280+ [ #foo baz: "Hello \\ \n \" World\" " ]
281+ bind
282+ [ #success]
283+ end
284+ } ) ;
285+
254286//--------------------------------------------------------------------
255287// Interpolation
256288//--------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments