pipeline_script/ast/
mod.rs

1use crate::ast::data::Data;
2use std::any::Any;
3use std::collections::HashMap;
4pub mod class;
5pub mod data;
6pub mod declaration;
7pub mod expr;
8pub mod function;
9pub mod module;
10pub mod stmt;
11pub mod r#struct;
12pub mod r#type;
13pub mod type_alias;
14
15pub trait NodeTrait {
16    fn get_id(&self) -> &str;
17    fn get_data(&self, key: &str) -> Option<Data>;
18    fn set_data(&mut self, key: &str, value: Data);
19    fn get_children(&self) -> Vec<&dyn NodeTrait>;
20    fn get_mut_children(&mut self) -> Vec<&mut dyn NodeTrait>;
21    #[allow(unused)]
22    fn get_extra(&self) -> &HashMap<String, Box<dyn Any>>;
23}