diff --git a/crates/testing-framework/src/transform/parser.rs b/crates/testing-framework/src/transform/parser.rs index 5b51457b..981e6482 100644 --- a/crates/testing-framework/src/transform/parser.rs +++ b/crates/testing-framework/src/transform/parser.rs @@ -125,7 +125,10 @@ fn parse_sexp_symbol(inp: Input<'_>) -> IResult, Sexp, ParseError<'_>> map( recognize(pair( many1_count(alt((value((), alphanumeric1), value((), one_of("_-.$#%"))))), - opt(delimited(tag("["), parse_sexp_symbol, tag("]"))), + opt(terminated( + delimited(tag("["), parse_sexp_symbol, tag("]")), + opt(tag("!")), + )), )), Sexp::symbol, )(inp) @@ -333,6 +336,12 @@ mod tests { assert_eq!(res, Ok(Sexp::symbol("sym_bol.$.blabla"))); } + #[test] + fn test_symbol_lambda_exclamation() { + let res = Sexp::from_str("pid-num.$.[0]!"); + assert_eq!(res, Ok(Sexp::symbol("pid-num.$.[0]!"))); + } + #[test] fn test_symbol_stream() { let res = Sexp::from_str("$stream");