#![doc = include_str!("readme.md")]
#[derive(Clone, Debug)]
pub struct VRoot {
pub module_name: String,
pub imports: Vec<String>,
pub items: Vec<VItem>,
}
#[derive(Clone, Debug)]
pub enum VItem {
Struct(VStruct),
Function(VFunction),
Enum(VEnum),
Const(VConst),
}
#[derive(Clone, Debug)]
pub struct VStruct {
pub name: String,
pub is_pub: bool,
pub fields: Vec<VField>,
}
#[derive(Clone, Debug)]
pub struct VField {
pub name: String,
pub field_type: String,
pub is_pub: bool,
pub is_mut: bool,
}
#[derive(Clone, Debug)]
pub struct VFunction {
pub name: String,
pub is_pub: bool,
pub receiver: Option<VReceiver>,
pub params: Vec<VParam>,
pub return_type: Option<String>,
pub body: Vec<String>,
}
#[derive(Clone, Debug)]
pub struct VReceiver {
pub name: String,
pub receiver_type: String,
pub is_mut: bool,
}
#[derive(Clone, Debug)]
pub struct VParam {
pub name: String,
pub param_type: String,
pub is_mut: bool,
}
#[derive(Clone, Debug)]
pub struct VEnum {
pub name: String,
pub is_pub: bool,
pub variants: Vec<String>,
}
#[derive(Clone, Debug)]
pub struct VConst {
pub name: String,
pub is_pub: bool,
pub value: String,
}