handle nested curly_group_word_list

This commit is contained in:
Nolan 2025-04-02 21:51:36 -04:00
parent c45c857851
commit 224162c3a1
2 changed files with 4 additions and 1 deletions

View file

@ -267,12 +267,15 @@ impl<'a> Parser<'a> {
| Token::Word
| Token::Pipe
| Token::Comma
| Token::LCurly
)
})
.is_some()
{
if self.peek() == Some(Token::Word) {
self.key();
} else if self.peek() == Some(Token::LCurly) {
self.curly_group_word_list();
} else {
self.eat();
}

View file

@ -209,7 +209,7 @@ impl HasCurly for CurlyGroupWordList {}
impl CurlyGroupWordList {
pub fn keys(&self) -> impl Iterator<Item = Key> {
self.syntax().children().filter_map(Key::cast)
self.syntax().descendants().filter_map(Key::cast)
}
}