mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 04:06:45 +01:00
implement TokensIterator::peek
This commit is contained in:
parent
a949117017
commit
92fcb0af8f
7 changed files with 196 additions and 198 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue