class Cosmo::Resolver
- Cosmo::Resolver
- Reference
- Object
Overview
This class is responsible for resolving declared/defined variables in the scope. I'm about 70% sure that it doesn't work as intended currently. lol
Included Modules
Defined in:
cosmo/runtime/resolver.crConstructors
Instance Method Summary
- #resolve(statements : Expression::Base | Statement::Base | Array(Statement::Base)) : Nil
- #start_time : Time::Span
- #visit_access_expr(expr : Expression::Access) : Nil
- #visit_binary_op_expr(expr : Expression::BinaryOp) : Nil
- #visit_block_stmt(stmt : Statement::Block) : Nil
- #visit_break_stmt(stmt : Statement::Break) : Nil
- #visit_case_stmt(stmt : Statement::Case) : Nil
- #visit_cast_expr(expr : Expression::Cast) : Nil
-
#visit_class_def_stmt(stmt : Statement::ClassDef) : Nil
abstract def visit_enum_def_stmt(stmt : EnumDef) : R
- #visit_compound_assignment_expr(expr : Expression::CompoundAssignment) : Nil
- #visit_every_stmt(stmt : Statement::Every) : Nil
- #visit_fn_call_expr(expr : Expression::FunctionCall) : Nil
- #visit_fn_def_stmt(stmt : Statement::FunctionDef) : Nil
- #visit_if_stmt(stmt : Statement::If) : Nil
- #visit_index_expr(expr : Expression::Index) : Nil
- #visit_is_expr(expr : Expression::Is) : Nil
- #visit_is_in_expr(expr : Expression::IsIn) : Nil
- #visit_lambda_expr(expr : Expression::Lambda) : Nil
- #visit_literal_expr(expr : Expression::Literal) : Nil
- #visit_multiple_assignment_expr(expr : Expression::MultipleAssignment) : Nil
- #visit_multiple_declaration_expr(expr : Expression::MultipleDeclaration) : Nil
- #visit_new_expr(expr : Expression::New) : Nil
- #visit_next_stmt(stmt : Statement::Next) : Nil
- #visit_property_assignment_expr(expr : Expression::PropertyAssignment) : Nil
- #visit_range_literal_expr(expr : Expression::RangeLiteral) : Nil
- #visit_return_stmt(stmt : Statement::Return) : Nil
- #visit_single_expr_stmt(stmt : Statement::SingleExpression) : Nil
- #visit_string_interpolation_expr(expr : Expression::StringInterpolation) : Nil
- #visit_table_literal_expr(expr : Expression::TableLiteral) : Nil
- #visit_ternary_op_expr(expr : Expression::TernaryOp) : Nil
- #visit_this_expr(expr : Expression::This) : Nil
- #visit_throw_stmt(stmt : Statement::Throw) : Nil
- #visit_try_catch_stmt(stmt : Statement::TryCatch) : Nil
- #visit_type_alias_expr(expr : Expression::TypeAlias) : Nil
- #visit_type_ref_expr(expr : Expression::TypeRef) : Nil
- #visit_unary_op_expr(expr : Expression::UnaryOp) : Nil
- #visit_unless_stmt(stmt : Statement::Unless) : Nil
- #visit_until_stmt(stmt : Statement::Until) : Nil
- #visit_use_stmt(stmt : Statement::Use) : Nil
- #visit_var_assignment_expr(expr : Expression::VarAssignment) : Nil
- #visit_var_declaration_expr(expr : Expression::VarDeclaration) : Nil
- #visit_var_expr(expr : Expression::Var) : Nil
- #visit_vector_literal_expr(expr : Expression::VectorLiteral) : Nil
- #visit_while_stmt(stmt : Statement::While) : Nil
Instance methods inherited from module Cosmo::AST::Statement::Visitor(Nil)
visit_block_stmt(stmt : Block) : R
visit_block_stmt,
visit_break_stmt(stmt : Break) : R
visit_break_stmt,
visit_case_stmt(stmt : Case) : R
visit_case_stmt,
visit_class_def_stmt(stmt : ClassDef) : R
visit_class_def_stmt,
visit_every_stmt(stmt : Every) : R
visit_every_stmt,
visit_fn_def_stmt(stmt : FunctionDef) : R
visit_fn_def_stmt,
visit_if_stmt(stmt : If) : R
visit_if_stmt,
visit_next_stmt(stmt : Next) : R
visit_next_stmt,
visit_return_stmt(stmt : Return) : R
visit_return_stmt,
visit_single_expr_stmt(stmt : SingleExpression) : R
visit_single_expr_stmt,
visit_throw_stmt(stmt : Throw) : R
visit_throw_stmt,
visit_try_catch_stmt(stmt : TryCatch) : R
visit_try_catch_stmt,
visit_unless_stmt(stmt : Unless) : R
visit_unless_stmt,
visit_until_stmt(stmt : Until) : R
visit_until_stmt,
visit_use_stmt(stmt : Use) : R
visit_use_stmt,
visit_while_stmt(stmt : While) : R
visit_while_stmt
Instance methods inherited from module Cosmo::AST::Expression::Visitor(Nil)
visit_binary_op_expr(expr : BinaryOp) : R
visit_binary_op_expr,
visit_cast_expr(expr : Cast) : R
visit_cast_expr,
visit_fn_call_expr(expr : FunctionCall) : R
visit_fn_call_expr,
visit_is_expr(expr : Is) : R
visit_is_expr,
visit_is_in_expr(expr : IsIn) : R
visit_is_in_expr,
visit_lambda_expr(expr : Lambda) : R
visit_lambda_expr,
visit_literal_expr(expr : Literal) : R
visit_literal_expr,
visit_multiple_assignment_expr(expr : MultipleAssignment) : R
visit_multiple_assignment_expr,
visit_property_assignment_expr(expr : PropertyAssignment) : R
visit_property_assignment_expr,
visit_range_literal_expr(expr : RangeLiteral) : R
visit_range_literal_expr,
visit_string_interpolation_expr(expr : StringInterpolation) : R
visit_string_interpolation_expr,
visit_table_literal_expr(expr : TableLiteral) : R
visit_table_literal_expr,
visit_ternary_op_expr(expr : TernaryOp) : R
visit_ternary_op_expr,
visit_this_expr(expr : This) : R
visit_this_expr,
visit_type_alias_expr(expr : TypeAlias) : R
visit_type_alias_expr,
visit_type_ref_expr(expr : TypeRef) : R
visit_type_ref_expr,
visit_unary_op_expr(expr : UnaryOp) : R
visit_unary_op_expr,
visit_var_assignment_expr(expr : VarAssignment) : R
visit_var_assignment_expr,
visit_var_declaration_expr(expr : VarDeclaration) : R
visit_var_declaration_expr,
visit_var_expr(expr : Var) : R
visit_var_expr,
visit_vector_literal_expr(expr : VectorLiteral) : R
visit_vector_literal_expr
Constructor Detail
Instance Method Detail
def visit_class_def_stmt(stmt : Statement::ClassDef) : Nil
#
Description copied from module Cosmo::AST::Statement::Visitor(Nil)
abstract def visit_enum_def_stmt(stmt : EnumDef) : R