From fe2b9880d67db66df62d2380b6d68eff4637090e Mon Sep 17 00:00:00 2001 From: John Date: Mon, 25 Sep 2023 16:46:06 -0500 Subject: [PATCH] lexer: Fix infinite loop while trimming whitespace --- libconlang/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libconlang/src/lib.rs b/libconlang/src/lib.rs index c2bb274..9aaee8b 100644 --- a/libconlang/src/lib.rs +++ b/libconlang/src/lib.rs @@ -189,7 +189,7 @@ pub mod lexer { self.has(|_| true, 1) } pub fn whitespace(self) -> Self { - self.and_any(|rule| rule.char_fn(|c| c.is_whitespace())) + self.char_fn(|c| c.is_whitespace()) } pub fn xid_start(self) -> Self { use unicode_xid::UnicodeXID;