From 5349cbfcc104749ca39828d0ac645ef745a8a005 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Fri, 30 Aug 2024 08:35:32 +0000 Subject: [PATCH] fix: remove comment escaping syntax --- --- a/crates/jrsonnet-parser/src/lib.rs +++ b/crates/jrsonnet-parser/src/lib.rs @@ -40,7 +40,7 @@ /// Standard C-like comments rule comment() = "//" (!eol()[_])* eol() - / "/*" ("\\*/" / "\\\\" / (!("*/")[_]))* "*/" + / "/*" (!("*/")[_])* "*/" / "#" (!eol()[_])* eol() rule single_whitespace() = quiet!{([' ' | '\r' | '\n' | '\t'] / comment())} / expected!("") @@ -593,19 +593,6 @@ ), 0, 41 - ) - ); - } - - /// Comments should be able to be escaped - #[test] - fn comment_escaping() { - assert_eq!( - parse!("2/*\\*/+*/ - 22"), - el!( - Expr::BinaryOp(el!(Expr::Num(2.0), 0, 1), Sub, el!(Expr::Num(22.0), 12, 14)), - 0, - 14 ) ); } -- gitstuff