pub struct Analyzer<'a> {
    pub shared: SharedState<'a>,
    /* private fields */
}Fields§
Implementations§
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
pub fn lookup_associated_function( &self, ty: &TypeRef, function_name: &str, ) -> Option<Function>
Sourcepub fn analyze_range(
    &mut self,
    min_expr: &Expression,
    max_expr: &Expression,
    mode: &RangeMode,
    ast_node: &Node,
) -> Expression
 
pub fn analyze_range( &mut self, min_expr: &Expression, max_expr: &Expression, mode: &RangeMode, ast_node: &Node, ) -> Expression
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
pub fn analyze_attributes(&self, attributes: &[Attribute]) -> Attributes
pub fn analyze_attribute(&self, parsed: &Attribute) -> Attribute
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
Sourcepub fn analyze_argument(
    &mut self,
    fn_parameter: &TypeForParameter,
    argument_expr: &Expression,
) -> ArgumentExpression
 
pub fn analyze_argument( &mut self, fn_parameter: &TypeForParameter, argument_expr: &Expression, ) -> ArgumentExpression
§Errors
Sourcepub fn analyze_and_verify_parameters(
    &mut self,
    node: &Node,
    fn_parameters: &[TypeForParameter],
    arguments: &[Expression],
) -> Vec<ArgumentExpression>
 
pub fn analyze_and_verify_parameters( &mut self, node: &Node, fn_parameters: &[TypeForParameter], arguments: &[Expression], ) -> Vec<ArgumentExpression>
§Errors
Sourcepub fn analyze_mut_or_immutable_expression(
    &mut self,
    expr: &Expression,
    context: &TypeContext<'_>,
    location_side: LocationSide,
) -> ArgumentExpression
 
pub fn analyze_mut_or_immutable_expression( &mut self, expr: &Expression, context: &TypeContext<'_>, location_side: LocationSide, ) -> ArgumentExpression
§Errors
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
pub fn try_find_constant( &self, qualified_constant_identifier: &QualifiedConstantIdentifier, ) -> Option<&ConstantRef>
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
Sourcepub fn analyze_alias_type_definition(
    &mut self,
    ast_alias: &AliasType,
) -> AliasType
 
pub fn analyze_alias_type_definition( &mut self, ast_alias: &AliasType, ) -> AliasType
§Errors
Sourcepub fn analyze_anonymous_struct_type(
    &mut self,
    ast_struct: &AnonymousStructType,
    ctx: &TypeAnalyzeContext,
) -> AnonymousStructType
 
pub fn analyze_anonymous_struct_type( &mut self, ast_struct: &AnonymousStructType, ctx: &TypeAnalyzeContext, ) -> AnonymousStructType
§Errors
Sourcepub fn analyze_anonymous_struct_type_fields(
    &mut self,
    ast_struct_fields: &[StructTypeField],
    ctx: &TypeAnalyzeContext,
) -> SeqMap<String, StructTypeField>
 
pub fn analyze_anonymous_struct_type_fields( &mut self, ast_struct_fields: &[StructTypeField], ctx: &TypeAnalyzeContext, ) -> SeqMap<String, StructTypeField>
§Errors
Sourcepub fn analyze_named_struct_type_definition(
    &mut self,
    ast_struct_def: &NamedStructDef,
)
 
pub fn analyze_named_struct_type_definition( &mut self, ast_struct_def: &NamedStructDef, )
§Errors
pub fn debug_definition(&self, definition: &Definition)
Sourcepub fn analyze_definition(&mut self, ast_def: &Definition)
 
pub fn analyze_definition(&mut self, ast_def: &Definition)
§Errors
Sourcepub fn analyze_impl_functions(
    &mut self,
    attach_to_type: &TypeRef,
    functions: &[&Function],
)
 
pub fn analyze_impl_functions( &mut self, attach_to_type: &TypeRef, functions: &[&Function], )
§Errors
Sourcepub fn on_type_encountered(&mut self, ty: &TypeRef, node: &Node)
 
pub fn on_type_encountered(&mut self, ty: &TypeRef, node: &Node)
Called whenever a type is resolved/created during analysis to ensure string functions exist
pub fn add_default_functions( &mut self, type_to_attach_to: &TypeRef, node: &Node, )
Sourcepub fn ensure_default_functions_for_type(&mut self, ty: &TypeRef, node: &Node)
 
pub fn ensure_default_functions_for_type(&mut self, ty: &TypeRef, node: &Node)
Ensures that a type has all necessary string functions generated This should be called whenever a type is encountered during analysis
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
pub fn analyze_enum_variant_struct_literal( &mut self, variant_ref: &EnumVariantType, found_enum_type: &TypeRef, anonym_struct_field_and_expressions: &[FieldExpression], detected_rest: bool, node: &Node, ) -> Expression
Sourcepub fn analyze_complex_literal_to_expression(
    &mut self,
    ast_expression: &Expression,
    ast_literal_kind: &LiteralKind,
    parent_context: &TypeContext<'_>,
) -> Expression
 
pub fn analyze_complex_literal_to_expression( &mut self, ast_expression: &Expression, ast_literal_kind: &LiteralKind, parent_context: &TypeContext<'_>, ) -> Expression
pub fn add_err(&mut self, kind: ErrorKind, ast_node: &Node)
pub fn create_err_vec( &mut self, kind: ErrorKind, ast_node: &Node, ) -> Vec<Expression>
pub fn create_err(&mut self, kind: ErrorKind, ast_node: &Node) -> Expression
pub fn create_err_resolved( &mut self, kind: ErrorKind, resolved_node: &Node, ) -> Expression
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
pub fn deduce_the_anon_struct_type( &mut self, ast_fields: &Vec<FieldExpression>, context: &TypeContext<'_>, ) -> AnonymousStructType
Sourcepub fn analyze_anonymous_struct_literal(
    &mut self,
    node: &Node,
    ast_fields: &Vec<FieldExpression>,
    rest_was_specified: bool,
    context: &TypeContext<'_>,
) -> Expression
 
pub fn analyze_anonymous_struct_literal( &mut self, node: &Node, ast_fields: &Vec<FieldExpression>, rest_was_specified: bool, context: &TypeContext<'_>, ) -> Expression
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
Source§impl Analyzer<'_>
 
impl Analyzer<'_>
pub fn reserve_slot(&mut self, node: &Node) -> Option<VariableSlot>
pub fn create_local_variable_with_reserved_slot( &mut self, slot: VariableSlot, ast_var: Variable, variable_type_ref: &TypeRef, ) -> (VariableRef, String)
pub const fn types(&mut self) -> &mut TypeCache
Source§impl<'a> Analyzer<'a>
 
impl<'a> Analyzer<'a>
pub fn new( state: &'a mut ProgramState, modules: &'a Modules, core_symbol_table: SymbolTableRef, source_map: &'a SourceMap, module_path: &[String], file_id: FileId, options: AnalyzerOptions, ) -> Self
pub fn analyze_local_function_access( &mut self, qualified_func_name: &QualifiedIdentifier, ) -> Option<Function>
Sourcepub fn analyze_start_chain_expression_get_mutability(
    &mut self,
    ast_expression: &Expression,
) -> Option<StartOfChainBase>
 
pub fn analyze_start_chain_expression_get_mutability( &mut self, ast_expression: &Expression, ) -> Option<StartOfChainBase>
§Errors
pub fn debug_expression(&self, expr: &Expression, description: &str)
pub fn debug_line(&self, offset: usize, description: &str)
Sourcepub fn analyze_main_expression(
    &mut self,
    ast_expression: &Expression,
) -> InternalMainExpression
 
pub fn analyze_main_expression( &mut self, ast_expression: &Expression, ) -> InternalMainExpression
§Errors
pub fn analyze_expression( &mut self, ast_expression: &Expression, context: &TypeContext<'_>, ) -> Expression
Sourcepub fn analyze_expression_internal(
    &mut self,
    ast_expression: &Expression,
    context: &TypeContext<'_>,
) -> Expression
 
pub fn analyze_expression_internal( &mut self, ast_expression: &Expression, context: &TypeContext<'_>, ) -> Expression
§Errors
Sourcepub fn analyze_struct_field(
    &mut self,
    field_name: &Node,
    tv: &TypeRef,
) -> (AnonymousStructType, usize, TypeRef)
 
pub fn analyze_struct_field( &mut self, field_name: &Node, tv: &TypeRef, ) -> (AnonymousStructType, usize, TypeRef)
pub fn analyze_static_call( &mut self, ast_node: &Node, func_def: Function, arguments: &[Expression], context: &TypeContext<'_>, ) -> Expression
pub fn str_to_byte(text: &str) -> Result<u8, ParseByteError>
pub fn chain_is_owned_result( start_of_chain: &StartOfChain, chains: &Vec<Postfix>, ) -> (bool, bool)
pub fn check_assignment_mode( &mut self, lhs_is_mutable: bool, source_expression: &Expression, ty: &TypeRef, ) -> AssignmentMode
pub const fn check_mutable_assignment( &mut self, assignment_mode: AssignmentMode, node: &Node, )
pub const fn check_mutable_variable_assignment( &mut self, source_expression: &Expression, ty: &TypeRef, variable: &Variable, )
Sourcepub fn analyze_variable_definition(
    &mut self,
    variable: &Variable,
    annotation_type: &Option<Type>,
    source_expression: &Expression,
) -> Expression
 
pub fn analyze_variable_definition( &mut self, variable: &Variable, annotation_type: &Option<Type>, source_expression: &Expression, ) -> Expression
§Errors
Sourcepub fn analyze_variable_assignment(
    &mut self,
    variable: &Variable,
    source_expression: &Expression,
) -> Expression
 
pub fn analyze_variable_assignment( &mut self, variable: &Variable, source_expression: &Expression, ) -> Expression
§Errors
pub fn common_variable_util( &mut self, variable_resolution: VariableResolution, ast_node: &Node, source_expression: &Expression, ) -> Expression
pub fn resolve_variable_expression( &mut self, maybe_annotated_type: Option<TypeRef>, source_expression: &Expression, ) -> (TypeRef, Expression)
pub const fn create_expr( &self, kind: ExpressionKind, ty: TypeRef, ast_node: &Node, ) -> Expression
pub fn analyze_generic_parameter_usize( &self, generic_parameter: &GenericParameter, ) -> usize
pub fn analyze_generic_parameter_usize_tuple( &self, generic_parameter: &GenericParameter, ) -> (usize, usize)
pub fn analyze_special_named_type( &mut self, path: &[String], name: &str, ast_generic_parameters: &[GenericParameter], ) -> Option<TypeRef>
Auto Trait Implementations§
impl<'a> Freeze for Analyzer<'a>
impl<'a> RefUnwindSafe for Analyzer<'a>
impl<'a> !Send for Analyzer<'a>
impl<'a> !Sync for Analyzer<'a>
impl<'a> Unpin for Analyzer<'a>
impl<'a> !UnwindSafe for Analyzer<'a>
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