sammine-lang
Loading...
Searching...
No Matches
sammine_lang::AST::BiTypeCheckerVisitor Class Reference
Inheritance diagram for sammine_lang::AST::BiTypeCheckerVisitor:
Collaboration diagram for sammine_lang::AST::BiTypeCheckerVisitor:

Classes

struct  TypeClassInfo
struct  TypeClassInstanceInfo

Public Member Functions

bool unify (const Type &pattern, const Type &concrete, std::unordered_map< std::string, Type > &bindings)
Type substitute (const Type &type, const std::unordered_map< std::string, Type > &bindings) const
bool contains_type_param (const Type &type, const std::string &param_name)
virtual void enter_new_scope () override
virtual void exit_new_scope () override
 BiTypeCheckerVisitor (ASTProperties &props)
std::optional< Typeget_type_from_id (const std::string &str) const
std::optional< Typeget_type_from_id_parent (const std::string &str) const
std::optional< Typeget_typename_type (const std::string &str) const
std::optional< Typetry_get_callee_type (const std::string &str) const
 Try to find a name in current scope + parent scopes (non-aborting).
virtual void visit (ProgramAST *ast) override
virtual void visit (VarDefAST *ast) override
virtual void visit (ExternAST *ast) override
virtual void visit (FuncDefAST *ast) override
virtual void visit (StructDefAST *ast) override
virtual void visit (EnumDefAST *ast) override
virtual void visit (TypeAliasDefAST *ast) override
virtual void visit (PrototypeAST *ast) override
virtual void visit (CallExprAST *ast) override
virtual void visit (ReturnExprAST *ast) override
virtual void visit (BinaryExprAST *ast) override
virtual void visit (NumberExprAST *ast) override
virtual void visit (StringExprAST *ast) override
virtual void visit (BoolExprAST *ast) override
virtual void visit (CharExprAST *ast) override
virtual void visit (UnitExprAST *ast) override
virtual void visit (VariableExprAST *ast) override
virtual void visit (BlockAST *ast) override
virtual void visit (IfExprAST *ast) override
virtual void visit (TypedVarAST *ast) override
virtual void visit (DerefExprAST *ast) override
virtual void visit (AddrOfExprAST *ast) override
virtual void visit (AllocExprAST *ast) override
virtual void visit (FreeExprAST *ast) override
virtual void visit (ArrayLiteralExprAST *ast) override
virtual void visit (IndexExprAST *ast) override
virtual void visit (LenExprAST *ast) override
virtual void visit (UnaryNegExprAST *ast) override
virtual void visit (StructLiteralExprAST *ast) override
virtual void visit (FieldAccessExprAST *ast) override
virtual void visit (CaseExprAST *ast) override
virtual void visit (WhileExprAST *ast) override
virtual void visit (TupleLiteralExprAST *ast) override
virtual void visit (TypeClassDeclAST *ast) override
virtual void visit (TypeClassInstanceAST *ast) override
void pre_register_function (PrototypeAST *ast)
void register_typeclass_decl (TypeClassDeclAST *ast)
void register_typeclass_instance (TypeClassInstanceAST *ast)
void register_builtin_op_instances ()
std::optional< Typesynthesize_typeclass_call (CallExprAST *ast)
Type synthesize_generic_call (CallExprAST *ast)
Type synthesize_normal_call (CallExprAST *ast)
Type synthesize_binary_operator (BinaryExprAST *ast, const Type &lhs_type, const Type &rhs_type)
bool check_array_literal_against_annotation (VarDefAST *ast, ArrayLiteralExprAST *arr_lit, const ArrayType &arr_type)
virtual void preorder_walk (ProgramAST *ast) override
virtual void preorder_walk (VarDefAST *ast) override
virtual void preorder_walk (ExternAST *ast) override
virtual void preorder_walk (FuncDefAST *ast) override
virtual void preorder_walk (StructDefAST *ast) override
virtual void preorder_walk (EnumDefAST *ast) override
virtual void preorder_walk (TypeAliasDefAST *ast) override
virtual void preorder_walk (PrototypeAST *ast) override
virtual void preorder_walk (CallExprAST *ast) override
virtual void preorder_walk (ReturnExprAST *ast) override
virtual void preorder_walk (BinaryExprAST *ast) override
virtual void preorder_walk (NumberExprAST *ast) override
virtual void preorder_walk (StringExprAST *ast) override
virtual void preorder_walk (BoolExprAST *ast) override
virtual void preorder_walk (CharExprAST *ast) override
virtual void preorder_walk (UnitExprAST *ast) override
virtual void preorder_walk (VariableExprAST *ast) override
virtual void preorder_walk (BlockAST *ast) override
virtual void preorder_walk (IfExprAST *ast) override
virtual void preorder_walk (TypedVarAST *ast) override
virtual void preorder_walk (DerefExprAST *ast) override
virtual void preorder_walk (AddrOfExprAST *ast) override
virtual void preorder_walk (AllocExprAST *ast) override
virtual void preorder_walk (FreeExprAST *ast) override
virtual void preorder_walk (ArrayLiteralExprAST *ast) override
virtual void preorder_walk (IndexExprAST *ast) override
virtual void preorder_walk (LenExprAST *ast) override
virtual void preorder_walk (UnaryNegExprAST *ast) override
virtual void preorder_walk (StructLiteralExprAST *ast) override
virtual void preorder_walk (FieldAccessExprAST *ast) override
virtual void preorder_walk (CaseExprAST *ast) override
virtual void preorder_walk (WhileExprAST *ast) override
virtual void preorder_walk (TupleLiteralExprAST *ast) override
virtual void preorder_walk (TypeClassDeclAST *ast) override
virtual void preorder_walk (TypeClassInstanceAST *ast) override
virtual void postorder_walk (ProgramAST *ast) override
virtual void postorder_walk (VarDefAST *ast) override
virtual void postorder_walk (ExternAST *ast) override
virtual void postorder_walk (FuncDefAST *ast) override
virtual void postorder_walk (StructDefAST *ast) override
virtual void postorder_walk (EnumDefAST *ast) override
virtual void postorder_walk (TypeAliasDefAST *ast) override
virtual void postorder_walk (PrototypeAST *ast) override
virtual void postorder_walk (CallExprAST *ast) override
virtual void postorder_walk (ReturnExprAST *ast) override
virtual void postorder_walk (BinaryExprAST *ast) override
virtual void postorder_walk (NumberExprAST *ast) override
virtual void postorder_walk (StringExprAST *ast) override
virtual void postorder_walk (BoolExprAST *ast) override
virtual void postorder_walk (CharExprAST *ast) override
virtual void postorder_walk (UnitExprAST *ast) override
virtual void postorder_walk (VariableExprAST *ast) override
virtual void postorder_walk (BlockAST *ast) override
virtual void postorder_walk (IfExprAST *ast) override
virtual void postorder_walk (TypedVarAST *ast) override
virtual void postorder_walk (DerefExprAST *ast) override
virtual void postorder_walk (AddrOfExprAST *ast) override
virtual void postorder_walk (AllocExprAST *ast) override
virtual void postorder_walk (FreeExprAST *ast) override
virtual void postorder_walk (ArrayLiteralExprAST *ast) override
virtual void postorder_walk (IndexExprAST *ast) override
virtual void postorder_walk (LenExprAST *ast) override
virtual void postorder_walk (UnaryNegExprAST *ast) override
virtual void postorder_walk (StructLiteralExprAST *ast) override
virtual void postorder_walk (FieldAccessExprAST *ast) override
virtual void postorder_walk (CaseExprAST *ast) override
virtual void postorder_walk (WhileExprAST *ast) override
virtual void postorder_walk (TupleLiteralExprAST *ast) override
virtual void postorder_walk (TypeClassDeclAST *ast) override
virtual void postorder_walk (TypeClassInstanceAST *ast) override
virtual Type synthesize (ProgramAST *ast) override
virtual Type synthesize (VarDefAST *ast) override
virtual Type synthesize (ExternAST *ast) override
virtual Type synthesize (FuncDefAST *ast) override
virtual Type synthesize (StructDefAST *ast) override
virtual Type synthesize (EnumDefAST *ast) override
virtual Type synthesize (TypeAliasDefAST *ast) override
virtual Type synthesize (PrototypeAST *ast) override
virtual Type synthesize (CallExprAST *ast) override
virtual Type synthesize (ReturnExprAST *ast) override
virtual Type synthesize (BinaryExprAST *ast) override
virtual Type synthesize (NumberExprAST *ast) override
virtual Type synthesize (UnitExprAST *ast) override
virtual Type synthesize (StringExprAST *ast) override
virtual Type synthesize (BoolExprAST *ast) override
virtual Type synthesize (CharExprAST *ast) override
virtual Type synthesize (VariableExprAST *ast) override
virtual Type synthesize (BlockAST *ast) override
virtual Type synthesize (IfExprAST *ast) override
virtual Type synthesize (TypedVarAST *ast) override
virtual Type synthesize (DerefExprAST *ast) override
virtual Type synthesize (AddrOfExprAST *ast) override
virtual Type synthesize (AllocExprAST *ast) override
virtual Type synthesize (FreeExprAST *ast) override
virtual Type synthesize (ArrayLiteralExprAST *ast) override
virtual Type synthesize (IndexExprAST *ast) override
virtual Type synthesize (LenExprAST *ast) override
virtual Type synthesize (UnaryNegExprAST *ast) override
virtual Type synthesize (StructLiteralExprAST *ast) override
virtual Type synthesize (FieldAccessExprAST *ast) override
virtual Type synthesize (CaseExprAST *ast) override
virtual Type synthesize (WhileExprAST *ast) override
virtual Type synthesize (TupleLiteralExprAST *ast) override
virtual Type synthesize (TypeClassDeclAST *ast) override
virtual Type synthesize (TypeClassInstanceAST *ast) override
Type resolve_type_expr (TypeExprAST *type_expr)
Public Member Functions inherited from sammine_lang::AST::ASTVisitor
virtual void abort (const std::string &msg="<NO MESSAGE>") override final
Public Member Functions inherited from sammine_util::Reportee
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
const_iterator cbegin () const
const_iterator cend () const
template<explicitly_bool_like T>
void abort_on (const T &condition, const std::string &message="<NO MESSAGE>")
template<explicitly_bool_like T>
void abort_if_not (const T &condition, const std::string &message="<NO MESSAGE>")
void add_error (Location loc, std::string msg, std::source_location src=std::source_location::current())
void add_error (Location loc, std::vector< std::string > msgs, std::source_location src=std::source_location::current())
void add_warn (Location loc, std::string msg, std::source_location src=std::source_location::current())
void add_diagnostics (Location loc, std::string msg, std::source_location src=std::source_location::current())
virtual bool has_errors () const
bool has_warn () const
bool has_message () const
bool has_diagnostics () const
int64_t get_error_count () const
int64_t get_warn_count () const
int64_t get_diagnostic_count () const

Public Attributes

ASTPropertiesprops_
LexicalStack< Type, AST::FuncDefAST * > id_to_type
LexicalStack< Type, AST::FuncDefAST * > typename_to_type
TypeMapOrdering type_map_ordering
std::unordered_map< std::string, FuncDefAST * > generic_func_defs
std::vector< std::unique_ptr< FuncDefAST > > monomorphized_defs
std::set< std::string > instantiated_functions
std::unordered_map< std::string, EnumDefAST * > generic_enum_defs
std::vector< std::unique_ptr< EnumDefAST > > monomorphized_enum_defs
std::set< std::string > instantiated_enums
std::unordered_map< std::string, TypeClassInfotype_class_defs
std::unordered_map< std::string, TypeClassInstanceInfotype_class_instances
std::unordered_map< std::string, std::string > method_to_class
std::unordered_map< std::string, std::pair< Type, size_t > > variant_constructors

Additional Inherited Members

Public Types inherited from sammine_util::Reportee
enum  ReportKind { error , warn , diag }
using Report
using iterator = std::vector<Report>::iterator
using const_iterator = std::vector<Report>::const_iterator
Protected Attributes inherited from sammine_lang::AST::ASTVisitor
ProgramASTtop_level_ast = nullptr
Protected Attributes inherited from sammine_util::Reportee
std::vector< Report > reports
int64_t error_count = 0
int64_t warn_count = 0
int64_t diag_count = 0

Member Function Documentation

◆ enter_new_scope()

virtual void sammine_lang::AST::BiTypeCheckerVisitor::enter_new_scope ( )
inlineoverridevirtual

◆ exit_new_scope()

virtual void sammine_lang::AST::BiTypeCheckerVisitor::exit_new_scope ( )
inlineoverridevirtual

◆ postorder_walk() [1/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( AddrOfExprAST * ast)
overridevirtual

◆ postorder_walk() [2/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( AllocExprAST * ast)
overridevirtual

◆ postorder_walk() [3/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( ArrayLiteralExprAST * ast)
overridevirtual

◆ postorder_walk() [4/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( BinaryExprAST * ast)
overridevirtual

◆ postorder_walk() [5/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( BlockAST * ast)
overridevirtual

◆ postorder_walk() [6/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( BoolExprAST * ast)
overridevirtual

◆ postorder_walk() [7/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( CallExprAST * ast)
overridevirtual

◆ postorder_walk() [8/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( CaseExprAST * ast)
overridevirtual

◆ postorder_walk() [9/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( CharExprAST * ast)
overridevirtual

◆ postorder_walk() [10/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( DerefExprAST * ast)
overridevirtual

◆ postorder_walk() [11/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( EnumDefAST * ast)
overridevirtual

◆ postorder_walk() [12/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( ExternAST * ast)
overridevirtual

◆ postorder_walk() [13/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( FieldAccessExprAST * ast)
overridevirtual

◆ postorder_walk() [14/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( FreeExprAST * ast)
overridevirtual

◆ postorder_walk() [15/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( FuncDefAST * ast)
overridevirtual

◆ postorder_walk() [16/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( IfExprAST * ast)
overridevirtual

◆ postorder_walk() [17/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( IndexExprAST * ast)
overridevirtual

◆ postorder_walk() [18/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( LenExprAST * ast)
overridevirtual

◆ postorder_walk() [19/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( NumberExprAST * ast)
overridevirtual

◆ postorder_walk() [20/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( ProgramAST * ast)
overridevirtual

◆ postorder_walk() [21/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( PrototypeAST * ast)
overridevirtual

◆ postorder_walk() [22/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( ReturnExprAST * ast)
overridevirtual

◆ postorder_walk() [23/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( StringExprAST * ast)
overridevirtual

◆ postorder_walk() [24/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( StructDefAST * ast)
overridevirtual

◆ postorder_walk() [25/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( StructLiteralExprAST * ast)
overridevirtual

◆ postorder_walk() [26/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( TupleLiteralExprAST * ast)
overridevirtual

◆ postorder_walk() [27/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( TypeAliasDefAST * ast)
overridevirtual

◆ postorder_walk() [28/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( TypeClassDeclAST * ast)
overridevirtual

◆ postorder_walk() [29/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( TypeClassInstanceAST * ast)
overridevirtual

◆ postorder_walk() [30/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( TypedVarAST * ast)
overridevirtual

◆ postorder_walk() [31/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( UnaryNegExprAST * ast)
overridevirtual

◆ postorder_walk() [32/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( UnitExprAST * ast)
overridevirtual

◆ postorder_walk() [33/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( VarDefAST * ast)
overridevirtual

◆ postorder_walk() [34/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( VariableExprAST * ast)
overridevirtual

◆ postorder_walk() [35/35]

void sammine_lang::AST::BiTypeCheckerVisitor::postorder_walk ( WhileExprAST * ast)
overridevirtual

◆ preorder_walk() [1/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( AddrOfExprAST * ast)
overridevirtual

◆ preorder_walk() [2/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( AllocExprAST * ast)
overridevirtual

◆ preorder_walk() [3/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( ArrayLiteralExprAST * ast)
overridevirtual

◆ preorder_walk() [4/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( BinaryExprAST * ast)
overridevirtual

◆ preorder_walk() [5/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( BlockAST * ast)
overridevirtual

◆ preorder_walk() [6/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( BoolExprAST * ast)
overridevirtual

◆ preorder_walk() [7/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( CallExprAST * ast)
overridevirtual

◆ preorder_walk() [8/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( CaseExprAST * ast)
overridevirtual

◆ preorder_walk() [9/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( CharExprAST * ast)
overridevirtual

◆ preorder_walk() [10/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( DerefExprAST * ast)
overridevirtual

◆ preorder_walk() [11/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( EnumDefAST * ast)
overridevirtual

◆ preorder_walk() [12/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( ExternAST * ast)
overridevirtual

◆ preorder_walk() [13/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( FieldAccessExprAST * ast)
overridevirtual

◆ preorder_walk() [14/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( FreeExprAST * ast)
overridevirtual

◆ preorder_walk() [15/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( FuncDefAST * ast)
overridevirtual

◆ preorder_walk() [16/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( IfExprAST * ast)
overridevirtual

◆ preorder_walk() [17/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( IndexExprAST * ast)
overridevirtual

◆ preorder_walk() [18/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( LenExprAST * ast)
overridevirtual

◆ preorder_walk() [19/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( NumberExprAST * ast)
overridevirtual

◆ preorder_walk() [20/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( ProgramAST * ast)
overridevirtual

◆ preorder_walk() [21/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( PrototypeAST * ast)
overridevirtual

◆ preorder_walk() [22/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( ReturnExprAST * ast)
overridevirtual

◆ preorder_walk() [23/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( StringExprAST * ast)
overridevirtual

◆ preorder_walk() [24/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( StructDefAST * ast)
overridevirtual

◆ preorder_walk() [25/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( StructLiteralExprAST * ast)
overridevirtual

◆ preorder_walk() [26/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( TupleLiteralExprAST * ast)
overridevirtual

◆ preorder_walk() [27/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( TypeAliasDefAST * ast)
overridevirtual

◆ preorder_walk() [28/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( TypeClassDeclAST * ast)
overridevirtual

◆ preorder_walk() [29/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( TypeClassInstanceAST * ast)
overridevirtual

◆ preorder_walk() [30/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( TypedVarAST * ast)
overridevirtual

◆ preorder_walk() [31/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( UnaryNegExprAST * ast)
overridevirtual

◆ preorder_walk() [32/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( UnitExprAST * ast)
overridevirtual

◆ preorder_walk() [33/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( VarDefAST * ast)
overridevirtual

◆ preorder_walk() [34/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( VariableExprAST * ast)
overridevirtual

◆ preorder_walk() [35/35]

void sammine_lang::AST::BiTypeCheckerVisitor::preorder_walk ( WhileExprAST * ast)
overridevirtual

◆ synthesize() [1/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( AddrOfExprAST * ast)
overridevirtual

◆ synthesize() [2/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( AllocExprAST * ast)
overridevirtual

◆ synthesize() [3/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( ArrayLiteralExprAST * ast)
overridevirtual

◆ synthesize() [4/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( BinaryExprAST * ast)
overridevirtual

◆ synthesize() [5/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( BlockAST * ast)
overridevirtual

◆ synthesize() [6/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( BoolExprAST * ast)
overridevirtual

◆ synthesize() [7/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( CallExprAST * ast)
overridevirtual

◆ synthesize() [8/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( CaseExprAST * ast)
overridevirtual

◆ synthesize() [9/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( CharExprAST * ast)
overridevirtual

◆ synthesize() [10/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( DerefExprAST * ast)
overridevirtual

◆ synthesize() [11/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( EnumDefAST * ast)
overridevirtual

◆ synthesize() [12/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( ExternAST * ast)
overridevirtual

◆ synthesize() [13/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( FieldAccessExprAST * ast)
overridevirtual

◆ synthesize() [14/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( FreeExprAST * ast)
overridevirtual

◆ synthesize() [15/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( FuncDefAST * ast)
overridevirtual

◆ synthesize() [16/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( IfExprAST * ast)
overridevirtual

◆ synthesize() [17/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( IndexExprAST * ast)
overridevirtual

◆ synthesize() [18/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( LenExprAST * ast)
overridevirtual

◆ synthesize() [19/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( NumberExprAST * ast)
overridevirtual

◆ synthesize() [20/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( ProgramAST * ast)
overridevirtual

◆ synthesize() [21/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( PrototypeAST * ast)
overridevirtual

◆ synthesize() [22/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( ReturnExprAST * ast)
overridevirtual

◆ synthesize() [23/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( StringExprAST * ast)
overridevirtual

◆ synthesize() [24/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( StructDefAST * ast)
overridevirtual

◆ synthesize() [25/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( StructLiteralExprAST * ast)
overridevirtual

◆ synthesize() [26/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( TupleLiteralExprAST * ast)
overridevirtual

◆ synthesize() [27/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( TypeAliasDefAST * ast)
overridevirtual

◆ synthesize() [28/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( TypeClassDeclAST * ast)
overridevirtual

◆ synthesize() [29/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( TypeClassInstanceAST * ast)
overridevirtual

◆ synthesize() [30/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( TypedVarAST * ast)
overridevirtual

◆ synthesize() [31/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( UnaryNegExprAST * ast)
overridevirtual

◆ synthesize() [32/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( UnitExprAST * ast)
overridevirtual

◆ synthesize() [33/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( VarDefAST * ast)
overridevirtual

◆ synthesize() [34/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( VariableExprAST * ast)
overridevirtual

◆ synthesize() [35/35]

Type sammine_lang::AST::BiTypeCheckerVisitor::synthesize ( WhileExprAST * ast)
overridevirtual

◆ visit() [1/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( AddrOfExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [2/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( AllocExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [3/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( ArrayLiteralExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [4/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( BinaryExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [5/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( BlockAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [6/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( BoolExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [7/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( CallExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [8/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( CaseExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [9/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( CharExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [10/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( DerefExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [11/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( EnumDefAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [12/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( ExternAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [13/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( FieldAccessExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [14/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( FreeExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [15/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( FuncDefAST * ast)
overridevirtual

Only visiting the FuncDefAST requires the use of scoping for now.

In the future we might have to support BlockAST

Reimplemented from sammine_lang::AST::ScopedASTVisitor.

◆ visit() [16/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( IfExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [17/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( IndexExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [18/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( LenExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [19/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( NumberExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [20/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( ProgramAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [21/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( PrototypeAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [22/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( ReturnExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [23/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( StringExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [24/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( StructDefAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [25/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( StructLiteralExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [26/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( TupleLiteralExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [27/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( TypeAliasDefAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [28/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( TypeClassDeclAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [29/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( TypeClassInstanceAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [30/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( TypedVarAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [31/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( UnaryNegExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [32/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( UnitExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [33/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( VarDefAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [34/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( VariableExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

◆ visit() [35/35]

void sammine_lang::AST::BiTypeCheckerVisitor::visit ( WhileExprAST * ast)
overridevirtual

Reimplemented from sammine_lang::AST::ASTVisitor.

Member Data Documentation

◆ props_

ASTProperties& sammine_lang::AST::BiTypeCheckerVisitor::props_

INFO: Ok let's talk about error propagation in this checker. the synthesize will error if I cannot get something out of id_map or typename_map (technically shouldn't happen)


The documentation for this class was generated from the following files: