SeraphScript/src/types/script_type.rs

34 lines
569 B
Rust

use crate::defines::PointerSize;
use crate::types::Type;
use std::sync::Arc;
pub struct ScriptType {
fields: Vec<ScriptTypeField>,
size: PointerSize,
is_enum: bool,
}
pub struct ScriptTypeField {
field_type: Arc<dyn Type>,
}
impl ScriptType {
pub fn new() -> ScriptType {
ScriptType {
fields: Vec::new(),
size: 0,
is_enum: false,
}
}
}
impl Type for ScriptType {
fn get_size(&self) -> PointerSize {
self.size
}
fn is_enum(&self) -> bool {
self.is_enum
}
}