1 2 3 4 5 6 7 8 9 10 11
use crate::{ error::{Error, Result}, iter::Iter, }; pub fn parse_end(iter: Iter) -> Result<()> { match iter.next() { None => Ok(()), Some(unexpected) => Err(Error::new(unexpected.span(), "unexpected token")), } }