Macro futures_await_synom::peek [] [src]

macro_rules! peek {
    ($i:expr, $submac:ident!( $($args:tt)* )) => { ... };
    ($i:expr, $f:expr) => { ... };
}

Parse a value without consuming it from the input data.

  • Syntax: peek!(THING)
  • Output: THING
extern crate syn;
#[macro_use] extern crate synom;

use syn::{Expr, Ident};

// Parse an expression that begins with an identifier.
named!(ident_expr -> (Ident, Expr),
    tuple!(peek!(syn!(Ident)), syn!(Expr))
);