Skip to main content

factorio_ir/
structure.rs

1use crate::{debug::StructDebug, expression::Expression, function::Function, r#type::Type};
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct StructField {
5    pub name: String,
6    pub ty: Type,
7    pub source_type: Option<String>,
8}
9
10#[derive(Debug, Clone, PartialEq)]
11pub struct Struct {
12    pub name: String,
13    pub fields: Vec<StructField>,
14    pub constants: Vec<(String, Expression)>,
15    pub methods: Vec<Function>,
16    pub doc: Option<String>,
17    pub debug: Option<StructDebug>,
18}