ligen_ir/object/
mod.rs

1use crate::{Identifier, Literal, Type, Mutability};
2use crate::prelude::*;
3
4#[cfg(any(test, feature = "mocks"))]
5pub mod mock;
6
7#[derive(Debug, Default, PartialEq, Clone, Serialize, Deserialize)]
8/// Object struct
9pub struct Object {
10    /// Object's mutability.
11    pub mutability: Mutability,
12    /// Object's identifier.
13    pub identifier: Identifier,
14    /// Object's type.
15    pub type_: Type,
16    /// Object's literal value.
17    pub literal: Literal,
18}
19
20impl CountSymbols for Vec<Object> {
21    fn count_symbols(&self) -> usize {
22        self.len()
23    }
24}
25
26impl CountSymbols for &Vec<Object> {
27    fn count_symbols(&self) -> usize {
28        self.len()
29    }
30}