File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -418,10 +418,24 @@ pub fn try_read_list(input: &str) -> IResult<&str, Value> {
418
418
}
419
419
}
420
420
421
+ pub fn try_read_quoted ( input : & str ) -> IResult < & str , Value > {
422
+ named ! ( quote<& str , & str >, preceded!( consume_clojure_whitespaces_parser, tag!( "'" ) ) ) ;
423
+
424
+ let ( form, _) = quote ( input) ?;
425
+
426
+ let ( rest_input, quoted_form_value) = try_read ( form) ?;
427
+
428
+ // (quote value)
429
+ Ok ( ( rest_input,
430
+ vec ! [ Symbol :: intern( "quote" ) . to_rc_value( ) ,
431
+ quoted_form_value . to_rc_value( ) ] . into_list ( ) . to_value ( ) ) )
432
+ }
433
+
421
434
pub fn try_read ( input : & str ) -> IResult < & str , Value > {
422
435
preceded (
423
436
consume_clojure_whitespaces_parser,
424
437
alt ( (
438
+ try_read_quoted,
425
439
try_read_map,
426
440
try_read_string,
427
441
try_read_f64,
You can’t perform that action at this time.
0 commit comments