Struct SemanticAnalyzer

Source
struct SemanticAnalyzer {
Show 24 fields runtime_expr_ids: Vec<ExprId>, meta_expr_ids: Vec<MetaExprId>, meta_stmt_ids: Vec<MetaStmtId>, builder_ids: Vec<MetaExprId>, runtime_function_names: Vec<String>, meta_function_signatures: BTreeMap<String, Vec<TypeExpr>>, meta_function_return_types: BTreeMap<String, TypeExpr>, meta_function_inferred_returns: BTreeMap<String, MetaType>, meta_function_names: Vec<String>, struct_names: Vec<String>, extern_module_names: Vec<String>, next_runtime_expr: usize, next_meta_expr: usize, next_meta_stmt: usize, next_builder: usize, builder_envs: SecondaryMap<MetaExprId, Option<Vec<BuilderBindingInfo>>>, runtime_name_resolution: SecondaryMap<ExprId, Option<ResolvedName>>, meta_name_resolution: SecondaryMap<MetaExprId, Option<ResolvedName>>, runtime_expr_types: SecondaryMap<ExprId, Option<TypeExpr>>, meta_expr_types: SecondaryMap<MetaExprId, Option<MetaType>>, meta_call_info: SecondaryMap<MetaExprId, Option<MetaCallInfo>>, meta_match_info: SecondaryMap<MetaStmtId, Option<MetaMatchInfo>>, issues: Vec<(MetaExprId, SemanticIssue)>, meta_function_issues: BTreeMap<String, SemanticIssue>,
}

Fields§

§runtime_expr_ids: Vec<ExprId>§meta_expr_ids: Vec<MetaExprId>§meta_stmt_ids: Vec<MetaStmtId>§builder_ids: Vec<MetaExprId>§runtime_function_names: Vec<String>§meta_function_signatures: BTreeMap<String, Vec<TypeExpr>>§meta_function_return_types: BTreeMap<String, TypeExpr>§meta_function_inferred_returns: BTreeMap<String, MetaType>§meta_function_names: Vec<String>§struct_names: Vec<String>§extern_module_names: Vec<String>§next_runtime_expr: usize§next_meta_expr: usize§next_meta_stmt: usize§next_builder: usize§builder_envs: SecondaryMap<MetaExprId, Option<Vec<BuilderBindingInfo>>>§runtime_name_resolution: SecondaryMap<ExprId, Option<ResolvedName>>§meta_name_resolution: SecondaryMap<MetaExprId, Option<ResolvedName>>§runtime_expr_types: SecondaryMap<ExprId, Option<TypeExpr>>§meta_expr_types: SecondaryMap<MetaExprId, Option<MetaType>>§meta_call_info: SecondaryMap<MetaExprId, Option<MetaCallInfo>>§meta_match_info: SecondaryMap<MetaStmtId, Option<MetaMatchInfo>>§issues: Vec<(MetaExprId, SemanticIssue)>§meta_function_issues: BTreeMap<String, SemanticIssue>

Implementations§

Source§

impl SemanticAnalyzer

Source

fn visit_program(&mut self, program: &Program)

Source

fn infer_meta_function_returns(&mut self, functions: &[MetaFunctionDecl])

Source

fn infer_meta_block_result_type( &self, block: &MetaBlock, meta_env: &mut Vec<(String, Option<MetaType>)>, ) -> Option<MetaType>

Source

fn visit_block( &mut self, block: &Block, runtime_env: &mut Vec<(String, Option<TypeExpr>)>, meta_env: &mut Vec<(String, Option<MetaType>)>, )

Source

fn visit_stmt( &mut self, stmt: &Stmt, runtime_env: &mut Vec<(String, Option<TypeExpr>)>, meta_env: &mut Vec<(String, Option<MetaType>)>, )

Source

fn visit_expr( &mut self, expr: &Expr, runtime_env: &mut Vec<(String, Option<TypeExpr>)>, meta_env: &mut Vec<(String, Option<MetaType>)>, )

Source

fn visit_meta_block( &mut self, block: &MetaBlock, runtime_env: &mut Vec<(String, Option<TypeExpr>)>, meta_env: &mut Vec<(String, Option<MetaType>)>, )

Source

fn visit_meta_stmt( &mut self, stmt: &MetaStmt, runtime_env: &mut Vec<(String, Option<TypeExpr>)>, meta_env: &mut Vec<(String, Option<MetaType>)>, )

Source

fn visit_meta_expr( &mut self, expr: &MetaExpr, runtime_env: &[(String, Option<TypeExpr>)], meta_env: &[(String, Option<MetaType>)], )

Source

fn record_meta_issue( &mut self, id: MetaExprId, expr: &MetaExpr, runtime_env: &[(String, Option<TypeExpr>)], resolved_name: Option<&ResolvedName>, )

Source

fn record_meta_call_issues( &mut self, id: MetaExprId, expr: &MetaExpr, meta_env: &[(String, Option<MetaType>)], )

Source

fn infer_meta_expr_type_with_env( &self, expr: &MetaExpr, meta_env: &[(String, Option<MetaType>)], ) -> Option<MetaType>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.