difftreelog
fix(parser) import parsing order
in: master
1 file changed
crates/jsonnet-parser/src/lib.rsdiffbeforeafterboth188 / array_expr(s)188 / array_expr(s)189 / array_comp_expr(s)189 / array_comp_expr(s)190191 / var_expr(s)192 / local_expr(s)193 / if_then_else_expr(s)194190195 / l(s,<keyword("import") _ path:string() {Expr::Import(PathBuf::from(path))}>)191 / l(s,<keyword("importstr") _ path:string() {Expr::ImportStr(PathBuf::from(path))}>)196 / l(s,<keyword("importstr") _ path:string() {Expr::ImportStr(PathBuf::from(path))}>)192 / l(s,<keyword("import") _ path:string() {Expr::Import(PathBuf::from(path))}>)193194 / var_expr(s)195 / local_expr(s)196 / if_then_else_expr(s)197197198 / l(s,<keyword("function") _ "(" _ params:params(s) _ ")" _ expr:expr(s) {Expr::Function(params, expr)}>)198 / l(s,<keyword("function") _ "(" _ params:params(s) _ ")" _ expr:expr(s) {Expr::Function(params, expr)}>)199 / l(s,<assertion:assertion(s) _ ";" _ expr:expr(s) { Expr::AssertExpr(assertion, expr) }>)199 / l(s,<assertion:assertion(s) _ ";" _ expr:expr(s) { Expr::AssertExpr(assertion, expr) }>)375 parse!("import \"hello\""),375 parse!("import \"hello\""),376 el!(Expr::Import(PathBuf::from("hello"))),376 el!(Expr::Import(PathBuf::from("hello"))),377 );377 );378 assert_eq!(379 parse!("importstr \"garnish.txt\""),380 el!(Expr::ImportStr(PathBuf::from("garnish.txt")))381 );378 }382 }379383380 #[test]384 #[test]