pub struct Analyzer<'a> {
pub shared: SharedState<'a>,
/* private fields */
}
Fields§
Implementations§
Source§impl Analyzer<'_>
impl Analyzer<'_>
pub fn convert_to_function_access_kind( function_ref: &FunctionRef, ) -> ExpressionKind
pub fn lookup_associated_function( &self, ty: &Type, function_name: &str, ) -> Option<FunctionRef>
pub fn convert_to_function_access_expr( &self, associated_function_info: &FunctionRef, ast_node: &Node, ) -> Expression
Sourcepub fn analyze_range(
&mut self,
min_expr: &Expression,
max_expr: &Expression,
mode: &RangeMode,
ast_node: &Node,
) -> Result<Expression, Error>
pub fn analyze_range( &mut self, min_expr: &Expression, max_expr: &Expression, mode: &RangeMode, ast_node: &Node, ) -> Result<Expression, Error>
§Errors
Source§impl Analyzer<'_>
impl Analyzer<'_>
Sourcepub fn analyze_argument(
&mut self,
fn_parameter: &TypeForParameter,
argument_expr: &MutableOrImmutableExpression,
) -> Result<ArgumentExpressionOrLocation, Error>
pub fn analyze_argument( &mut self, fn_parameter: &TypeForParameter, argument_expr: &MutableOrImmutableExpression, ) -> Result<ArgumentExpressionOrLocation, Error>
§Errors
Sourcepub fn analyze_and_verify_parameters(
&mut self,
node: &Node,
fn_parameters: &[TypeForParameter],
arguments: &[MutableOrImmutableExpression],
) -> Result<Vec<ArgumentExpressionOrLocation>, Error>
pub fn analyze_and_verify_parameters( &mut self, node: &Node, fn_parameters: &[TypeForParameter], arguments: &[MutableOrImmutableExpression], ) -> Result<Vec<ArgumentExpressionOrLocation>, Error>
§Errors
Sourcepub fn analyze_mut_or_immutable_expression(
&mut self,
expr: &MutableOrImmutableExpression,
context: &TypeContext<'_>,
location_side: LocationSide,
) -> Result<MutOrImmutableExpression, Error>
pub fn analyze_mut_or_immutable_expression( &mut self, expr: &MutableOrImmutableExpression, context: &TypeContext<'_>, location_side: LocationSide, ) -> Result<MutOrImmutableExpression, Error>
§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,
) -> Result<AliasType, Error>
pub fn analyze_alias_type_definition( &mut self, ast_alias: &AliasType, ) -> Result<AliasType, Error>
§Errors
Sourcepub fn analyze_anonymous_struct_type(
&mut self,
ast_struct: &AnonymousStructType,
) -> Result<AnonymousStructType, Error>
pub fn analyze_anonymous_struct_type( &mut self, ast_struct: &AnonymousStructType, ) -> Result<AnonymousStructType, Error>
§Errors
Sourcepub fn analyze_anonymous_struct_type_fields(
&mut self,
ast_struct_fields: &[StructTypeField],
) -> Result<SeqMap<String, StructTypeField>, Error>
pub fn analyze_anonymous_struct_type_fields( &mut self, ast_struct_fields: &[StructTypeField], ) -> Result<SeqMap<String, StructTypeField>, Error>
§Errors
pub fn convert_to_type_variables( &mut self, ast_type_variables: &[TypeVariable], ) -> Vec<String>
Sourcepub fn set_type_variables_to_extra_symbol_table(
&mut self,
type_variables: &[String],
)
pub fn set_type_variables_to_extra_symbol_table( &mut self, type_variables: &[String], )
§Panics
Sourcepub fn analyze_named_struct_type_definition(
&mut self,
ast_struct_def: &NamedStructDef,
) -> Result<(), Error>
pub fn analyze_named_struct_type_definition( &mut self, ast_struct_def: &NamedStructDef, ) -> Result<(), Error>
§Errors
pub fn debug_definition(&self, definition: &Definition)
Sourcepub fn analyze_definition(&mut self, ast_def: &Definition) -> Result<(), Error>
pub fn analyze_definition(&mut self, ast_def: &Definition) -> Result<(), Error>
§Errors
Source§impl Analyzer<'_>
impl Analyzer<'_>
Sourcepub fn analyze_complex_literal_to_expression(
&mut self,
ast_node: &Node,
ast_literal_kind: &LiteralKind,
context: &TypeContext<'_>,
) -> Result<Expression, Error>
pub fn analyze_complex_literal_to_expression( &mut self, ast_node: &Node, ast_literal_kind: &LiteralKind, context: &TypeContext<'_>, ) -> Result<Expression, Error>
§Errors
pub fn create_err(&self, kind: ErrorKind, ast_node: &Node) -> Error
pub fn create_err_resolved( &self, kind: ErrorKind, resolved_node: &Node, ) -> Error
Source§impl Analyzer<'_>
impl Analyzer<'_>
Sourcepub fn analyze_anonymous_struct_literal(
&mut self,
node: &Node,
ast_fields: &Vec<FieldExpression>,
rest_was_specified: bool,
context: &TypeContext<'_>,
) -> Result<Expression, Error>
pub fn analyze_anonymous_struct_literal( &mut self, node: &Node, ast_fields: &Vec<FieldExpression>, rest_was_specified: bool, context: &TypeContext<'_>, ) -> Result<Expression, Error>
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, ) -> Self
Sourcepub fn analyze_start_chain_expression_get_mutability(
&mut self,
ast_expression: &Expression,
expected_type: Option<&Type>,
) -> Result<(Expression, bool), Error>
pub fn analyze_start_chain_expression_get_mutability( &mut self, ast_expression: &Expression, expected_type: Option<&Type>, ) -> Result<(Expression, bool), Error>
§Errors
pub fn debug_expression(&self, expr: &Expression)
pub fn analyze_main_expression( &mut self, ast_expression: &Expression, ) -> Result<InternalMainExpression, Error>
Sourcepub fn analyze_expression(
&mut self,
ast_expression: &Expression,
context: &TypeContext<'_>,
) -> Result<Expression, Error>
pub fn analyze_expression( &mut self, ast_expression: &Expression, context: &TypeContext<'_>, ) -> Result<Expression, Error>
§Errors
Sourcepub fn analyze_expression_internal(
&mut self,
ast_expression: &Expression,
context: &TypeContext<'_>,
) -> Result<Expression, Error>
pub fn analyze_expression_internal( &mut self, ast_expression: &Expression, context: &TypeContext<'_>, ) -> Result<Expression, Error>
§Errors
Sourcepub fn analyze_struct_field(
&mut self,
field_name: &Node,
tv: Type,
) -> Result<(AnonymousStructType, usize, Type), Error>
pub fn analyze_struct_field( &mut self, field_name: &Node, tv: Type, ) -> Result<(AnonymousStructType, usize, Type), Error>
Sourcepub fn analyze_variable_assignment(
&mut self,
variable: &Variable,
source_expression: &MutableOrImmutableExpression,
) -> Result<Expression, Error>
pub fn analyze_variable_assignment( &mut self, variable: &Variable, source_expression: &MutableOrImmutableExpression, ) -> Result<Expression, Error>
§Errors
pub const fn create_expr( &self, kind: ExpressionKind, ty: Type, ast_node: &Node, ) -> Expression
pub fn create_expr_resolved( &self, kind: ExpressionKind, ty: Type, ast_node: &Node, ) -> Expression
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