#![allow(dead_code)]
#[derive(Clone, Debug)]
pub struct CParameter {
pub name: String,
pub c_type: String,
pub scope: ParameterScope,
pub mutable: bool,
pub allow_none: bool,
pub comment: Option<String>,
}
#[derive(Clone, Debug)]
pub enum ParameterScope {
Call,
Static,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum FunctionKind {
Constructor,
Method,
Function,
}
#[derive(Clone, Debug)]
pub struct Function {
pub name: String,
pub comment: Option<String>,
pub kind: FunctionKind,
pub parameters: Vec<CParameter>,
pub ret: Return,
}
#[derive(Clone, Debug)]
pub enum Return {
Value(Option<CParameter>),
ResultError(CParameter),
}