syn-serde 0.3.2

Library to serialize and deserialize Syn syntax trees.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: Apache-2.0 OR MIT

use super::*;
pub use crate::ast_struct::{Block, Local, LocalInit, StmtMacro};

ast_enum! {
    /// An adapter for [`enum@syn::Stmt`].
    pub enum Stmt {
        #[serde(rename = "let")]
        Local(Local),
        Item(Item),
        // TODO: Should be Expr { expr: Exor, semi: bool }?
        Expr(Expr, bool),
        Macro(StmtMacro),
    }
}