diff --git a/core/src/syn/parser/idiom.rs b/core/src/syn/parser/idiom.rs index 852f69a6..14d428da 100644 --- a/core/src/syn/parser/idiom.rs +++ b/core/src/syn/parser/idiom.rs @@ -185,6 +185,8 @@ impl Parser<'_> { if let Some(x) = self.parse_graph_idiom(ctx, &mut res, Dir::Both).await? { return Ok(x); } + } else { + break; } } t!("..") => { diff --git a/core/src/syn/parser/test/mod.rs b/core/src/syn/parser/test/mod.rs index a1e12218..9c69db00 100644 --- a/core/src/syn/parser/test/mod.rs +++ b/core/src/syn/parser/test/mod.rs @@ -47,6 +47,16 @@ fn glued_identifiers() { assert_eq!(res, expected); } +#[test] +fn less_then_idiom() { + let src = r#" + if ($param.foo < 2){ + return 1 + } + "#; + test_parse!(parse_query, src).unwrap(); +} + #[test] fn escaped_params() { let src = r#"LET $⟨R-_fYU8Wa31kg7tz0JI6Kme⟩ = 5;