lexer: Fix infinite loop while trimming whitespace

This commit is contained in:
John 2023-09-25 16:46:06 -05:00
parent 247bb1f8f8
commit fe2b9880d6

View File

@ -189,7 +189,7 @@ pub mod lexer {
self.has(|_| true, 1) self.has(|_| true, 1)
} }
pub fn whitespace(self) -> Self { 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 { pub fn xid_start(self) -> Self {
use unicode_xid::UnicodeXID; use unicode_xid::UnicodeXID;