From 9fc7fc56bf0c3525c034b081aa4e59204523ea87 Mon Sep 17 00:00:00 2001 From: Лач Date: Wed, 10 Jun 2020 17:34:27 +0000 Subject: [PATCH] fix(parser): import parsing order --- --- a/crates/jsonnet-parser/src/lib.rs +++ b/crates/jsonnet-parser/src/lib.rs @@ -188,12 +188,12 @@ / array_expr(s) / array_comp_expr(s) + / l(s,) + / l(s,) + / var_expr(s) / local_expr(s) / if_then_else_expr(s) - - / l(s,) - / l(s,) / l(s,) / l(s,) @@ -375,6 +375,10 @@ parse!("import \"hello\""), el!(Expr::Import(PathBuf::from("hello"))), ); + assert_eq!( + parse!("importstr \"garnish.txt\""), + el!(Expr::ImportStr(PathBuf::from("garnish.txt"))) + ); } #[test] -- gitstuff