mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-04 06:50:23 +00:00
15 lines
488 B
Rust
15 lines
488 B
Rust
![]() |
use flowy_ast::{ASTContainer, ASTResult};
|
||
|
use proc_macro2::TokenStream;
|
||
|
|
||
|
pub fn expand_derive(input: &syn::DeriveInput) -> Result<TokenStream, Vec<syn::Error>> {
|
||
|
let ast_result = ASTResult::new();
|
||
|
// let cont = match ASTContainer::from_ast(&ast_result, input) {
|
||
|
// Some(cont) => cont,
|
||
|
// None => return Err(ast_result.check().unwrap_err()),
|
||
|
// };
|
||
|
|
||
|
let mut token_stream: TokenStream = TokenStream::default();
|
||
|
ast_result.check()?;
|
||
|
Ok(token_stream)
|
||
|
}
|