Expand description
This module is responsible of computing the semantic model of expressions and statements in the code, while type checking. It is invoked by queries for function bodies and other code blocks.
Structs§
- Computation
Context - Context for computing the semantic model of expression trees.
- Environment
- A state which contains all the variables defined at the current resolver until now, and a pointer to the parent environment.
- Expr
AndId - Expression with its id.
- Named
Arg - Named argument in a function call.
- Pattern
AndId
Enums§
Functions§
- compute_
expr_ block_ semantic - Computes the semantic model of an expression of type ast::ExprBlock.
- compute_
expr_ semantic - Computes the semantic model of an expression. Note that this expr will always be “registered” in the arena, so it can be looked up in the language server.
- compute_
named_ argument_ clause - Computes the semantic model of an expression of type ast::Arg.
- compute_
pattern_ semantic - Computes the semantic model of a pattern. Note that this pattern will always be “registered” in the arena, so it can be looked up in the language server.
- compute_
root_ expr - compute_
statement_ semantic - Computes the semantic model of a statement (excluding tail-expression).
- get_
binded_ expr_ by_ name - Returns the requested variable from the environment if it exists. Returns None otherwise.
- get_
statement_ item_ by_ name - Returns the requested item from the environment if it exists. Returns None otherwise.
- maybe_
compute_ expr_ semantic - Computes the semantic model of an expression, or returns a SemanticDiagnosticKind on error.
- resolve_
variable_ by_ name - Resolves a variable given a context and a simple name.