pub struct SymbolTable { /* private fields */ }
Implementations§
Source§impl SymbolTable
impl SymbolTable
pub fn internal_functions(&self) -> Vec<InternalFunctionDefinitionRef> ⓘ
Source§impl SymbolTable
impl SymbolTable
pub fn module_path(&self) -> Vec<String>
Source§impl SymbolTable
impl SymbolTable
pub fn new(module_path: &[String]) -> Self
pub fn is_empty(&self) -> bool
pub const fn symbols(&self) -> &SeqMap<String, Symbol>
pub fn structs(&self) -> SeqMap<String, NamedStructType>
Sourcepub fn extend_from(&mut self, symbol_table: &Self) -> Result<(), SemanticError>
pub fn extend_from(&mut self, symbol_table: &Self) -> Result<(), SemanticError>
§Errors
Sourcepub fn extend_basic_from(
&mut self,
symbol_table: &Self,
) -> Result<(), SemanticError>
pub fn extend_basic_from( &mut self, symbol_table: &Self, ) -> Result<(), SemanticError>
§Errors
Sourcepub fn extend_alias_from(
&mut self,
symbol_table: &Self,
) -> Result<(), SemanticError>
pub fn extend_alias_from( &mut self, symbol_table: &Self, ) -> Result<(), SemanticError>
§Errors
pub fn extend_intrinsic_functions_from( &mut self, symbol_table: &Self, ) -> Result<(), SemanticError>
pub fn get_package_version(&self, name: &str) -> Option<String>
Sourcepub fn add_constant(
&mut self,
constant: Constant,
) -> Result<ConstantRef, SemanticError>
pub fn add_constant( &mut self, constant: Constant, ) -> Result<ConstantRef, SemanticError>
§Errors
Sourcepub fn add_constant_link(
&mut self,
constant_ref: ConstantRef,
) -> Result<(), SemanticError>
pub fn add_constant_link( &mut self, constant_ref: ConstantRef, ) -> Result<(), SemanticError>
§Errors
Sourcepub fn add_alias(
&mut self,
alias_type: AliasType,
) -> Result<AliasType, SemanticError>
pub fn add_alias( &mut self, alias_type: AliasType, ) -> Result<AliasType, SemanticError>
§Errors
Sourcepub fn add_alias_link(
&mut self,
alias_type_ref: AliasType,
) -> Result<(), SemanticError>
pub fn add_alias_link( &mut self, alias_type_ref: AliasType, ) -> Result<(), SemanticError>
§Errors
Sourcepub fn add_blueprint(
&mut self,
blueprint: ParameterizedTypeBlueprint,
) -> Result<ParameterizedTypeBlueprint, SemanticError>
pub fn add_blueprint( &mut self, blueprint: ParameterizedTypeBlueprint, ) -> Result<ParameterizedTypeBlueprint, SemanticError>
§Errors
Sourcepub fn add_blueprint_link(
&mut self,
blueprint_ref: ParameterizedTypeBlueprint,
) -> Result<(), SemanticError>
pub fn add_blueprint_link( &mut self, blueprint_ref: ParameterizedTypeBlueprint, ) -> Result<(), SemanticError>
§Errors
pub fn get_blueprint(&self, name: &str) -> Option<&ParameterizedTypeBlueprint>
Sourcepub fn add_type_generator(
&mut self,
name: &str,
type_generator: TypeGenerator,
) -> Result<TypeGenerator, SemanticError>
pub fn add_type_generator( &mut self, name: &str, type_generator: TypeGenerator, ) -> Result<TypeGenerator, SemanticError>
§Errors
Sourcepub fn add_type_generator_link(
&mut self,
name: &str,
type_generator: TypeGenerator,
) -> Result<(), SemanticError>
pub fn add_type_generator_link( &mut self, name: &str, type_generator: TypeGenerator, ) -> Result<(), SemanticError>
§Errors
pub fn get_type_generator(&self, name: &str) -> Option<&TypeGenerator>
pub fn add_external_type( &mut self, external: ExternalType, ) -> Result<ExternalType, SemanticError>
Sourcepub fn add_external_type_link(
&mut self,
external_type_ref: ExternalType,
) -> Result<(), SemanticError>
pub fn add_external_type_link( &mut self, external_type_ref: ExternalType, ) -> Result<(), SemanticError>
§Errors
Sourcepub fn add_struct(
&mut self,
struct_type: NamedStructType,
) -> Result<NamedStructType, SemanticError>
pub fn add_struct( &mut self, struct_type: NamedStructType, ) -> Result<NamedStructType, SemanticError>
§Errors
Sourcepub fn add_generated_struct(
&mut self,
name: &str,
fields: &[(&str, Type)],
) -> Result<NamedStructType, SemanticError>
pub fn add_generated_struct( &mut self, name: &str, fields: &[(&str, Type)], ) -> Result<NamedStructType, SemanticError>
§Errors
Sourcepub fn add_struct_link(
&mut self,
struct_type_ref: NamedStructType,
) -> Result<(), SemanticError>
pub fn add_struct_link( &mut self, struct_type_ref: NamedStructType, ) -> Result<(), SemanticError>
§Errors
pub fn add_enum_type( &mut self, enum_type: EnumType, ) -> Result<(), SemanticError>
pub fn add_enum_type_link( &mut self, enum_type_ref: EnumType, ) -> Result<(), SemanticError>
pub fn add_internal_function( &mut self, name: &str, function: InternalFunctionDefinition, ) -> Result<InternalFunctionDefinitionRef, SemanticError>
pub fn add_internal_function_link( &mut self, name: &str, function_ref: InternalFunctionDefinitionRef, ) -> Result<(), SemanticError>
pub fn get_symbol(&self, name: &str) -> Option<&Symbol>
pub fn add_symbol( &mut self, name: &str, symbol: Symbol, ) -> Result<(), SemanticError>
pub fn get_type(&self, name: &str) -> Option<&Type>
pub fn get_struct(&self, name: &str) -> Option<&NamedStructType>
pub fn get_enum(&self, name: &str) -> Option<&EnumType>
pub fn get_enum_variant_type( &self, enum_type_name: &str, variant_name: &str, ) -> Option<EnumVariantType>
pub fn get_constant(&self, name: &str) -> Option<&ConstantRef>
pub fn get_function(&self, name: &str) -> Option<&FuncDef>
pub fn get_internal_function( &self, name: &str, ) -> Option<&InternalFunctionDefinitionRef>
pub fn get_intrinsic_function( &self, name: &str, ) -> Option<&IntrinsicFunctionDefinitionRef>
pub fn get_external_function_declaration( &self, name: &str, ) -> Option<&ExternalFunctionDefinitionRef>
pub fn get_external_type(&self, name: &str) -> Option<&ExternalType>
pub fn add_external_function_declaration( &mut self, decl: ExternalFunctionDefinition, ) -> Result<ExternalFunctionDefinitionRef, SemanticError>
pub fn add_external_function_declaration_link( &mut self, decl_ref: ExternalFunctionDefinitionRef, ) -> Result<(), SemanticError>
pub fn add_module_link( &mut self, name: &str, ns: ModuleRef, ) -> Result<(), SemanticError>
pub fn get_module_link(&self, name: &str) -> Option<&ModuleRef>
pub fn add_package_version( &mut self, name: &str, version: TinyVersion, ) -> Result<(), SemanticError>
pub fn add_intrinsic_function( &mut self, function: IntrinsicFunctionDefinition, ) -> Result<IntrinsicFunctionDefinitionRef, SemanticError>
Trait Implementations§
Source§impl Clone for SymbolTable
impl Clone for SymbolTable
Source§fn clone(&self) -> SymbolTable
fn clone(&self) -> SymbolTable
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for SymbolTable
impl RefUnwindSafe for SymbolTable
impl !Send for SymbolTable
impl !Sync for SymbolTable
impl Unpin for SymbolTable
impl UnwindSafe for SymbolTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more