luaur-analysis 0.1.3

Luau type checker and type inference (Rust).
Documentation
//! @interface-stub
use crate::enums::pack_field::PackField;
use crate::enums::type_field::TypeField;
use crate::records::generic_pack_mapping::GenericPackMapping;
use crate::records::index::Index;
use crate::records::pack_slice::PackSlice;
use crate::records::path::Path;
use crate::records::property_type_path::Property;
use crate::records::reduction::Reduction;
use crate::type_aliases::component::Component;

#[derive(Debug, Clone)]
pub struct PathHash;

impl PathHash {
    pub fn operator_property(&self, prop: &Property) -> usize {
        self.operator_call_7(prop)
    }
    pub fn operator_index(&self, idx: &Index) -> usize {
        self.operator_call_3(idx)
    }
    pub fn operator_type_field(&self, field: &TypeField) -> usize {
        self.operator_call_9(field)
    }
    pub fn operator_pack_field(&self, field: &PackField) -> usize {
        self.operator_call_4(field)
    }
    pub fn operator_pack_slice(&self, slice: &PackSlice) -> usize {
        self.operator_call_5(slice)
    }
    pub fn operator_reduction(&self, reduction: &Reduction) -> usize {
        self.operator_call_8(reduction)
    }
    pub fn operator_generic_pack_mapping(&self, mapping: &GenericPackMapping) -> usize {
        self.operator_call_2(mapping)
    }
    pub fn operator_component(&self, component: &Component) -> usize {
        match component {
            Component::Property(prop) => self.operator_property(prop),
            Component::Index(idx) => self.operator_index(idx),
            Component::TypeField(field) => self.operator_type_field(field),
            Component::PackField(field) => self.operator_pack_field(field),
            Component::PackSlice(slice) => self.operator_pack_slice(slice),
            Component::Reduction(reduction) => self.operator_reduction(reduction),
            Component::GenericPackMapping(mapping) => self.operator_generic_pack_mapping(mapping),
        }
    }
    pub fn operator_path(&self, path: &Path) -> usize {
        self.operator_call_6(path)
    }
}