pub fn validate<T: Parse>(
tokens: &TokenStream,
what: &'static str,
) -> Result<T, EmitError>Expand description
Parse generated tokens as a complete syntax node of type T, to check
that an emitter produced valid Rust.
ยงErrors
Returns EmitError::Syntax, naming what, when the tokens do not parse.