Proper way to parse multiple items in procedural macro?

What is proper way to parse multiple items?

Currently my code looks, like that

pub fn impls( input : proc_macro::TokenStream ) -> Result< proc_macro2::TokenStream >
{

  let _ast = match syn::parse::< syn::Item >( input )
  {
    Ok( syntax_tree ) => syntax_tree,
    Err( err ) => return Err( err ),
  };

  let result = parse_quote!
  {
  };

  Ok( result )
}

But it parse only one item.

By the way what is difference between TokenStream and ParseStream?
Any article explaining such things?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.