implement TokensIterator::peek

This commit is contained in:
🪞👃🪞 2025-01-18 03:47:18 +01:00
parent a949117017
commit 92fcb0af8f
7 changed files with 196 additions and 198 deletions

View file

@ -110,7 +110,7 @@ pub trait AtomCommand<C>: Command<C> {
fn from_atom <'a> (
$state: &$T, head: &impl Atom, tail: &'a [impl Atom]
) -> Option<Self> {
$(if let (TokenType::Key, $key, [ // if the identifier matches
$(if let (TokenKind::Key, $key, [ // if the identifier matches
// bind argument ids
$($arg),*
// bind rest parameters
@ -153,7 +153,7 @@ pub trait AtomCommand<C>: Command<C> {
head: &impl Atom,
tail: &'a [impl Atom],
) -> Option<Self> {
$(if let (TokenType::Key, $key, [ // if the identifier matches
$(if let (TokenKind::Key, $key, [ // if the identifier matches
// bind argument ids
$($arg),*
// bind rest parameters