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:

Public Member Functions

virtual void enter_new_scope () override
 
virtual void exit_new_scope () override
 
std::optional< Typeget_type_from_id (const std::string &str)
 
std::optional< Typeget_type_from_id_parent (const std::string &str)
 
std::optional< Typeget_typename_type (const std::string &str)
 
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 (RecordDefAST *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 (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 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 (RecordDefAST *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 (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 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 (RecordDefAST *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 (VariableExprAST *ast) override
 
virtual Type synthesize (BlockAST *ast) override
 
virtual Type synthesize (IfExprAST *ast) override
 
virtual Type synthesize (TypedVarAST *ast) override
 
Type get_type_from_type_lexeme (const std::string &type_lexeme, sammine_util::Location location)
 
- Public Member Functions inherited from sammine_lang::AST::ScopedASTVisitor
virtual void visit (FuncDefAST *ast)
 
- Public Member Functions inherited from sammine_lang::AST::ASTVisitor
virtual void abort (const std::string &msg="<NO MESSAGE>") override final
 
virtual void visit (ProgramAST *ast)
 
virtual void visit (VarDefAST *ast)
 
virtual void visit (ExternAST *ast)
 
virtual void visit (RecordDefAST *ast)
 
virtual void visit (PrototypeAST *ast)
 
virtual void visit (CallExprAST *ast)
 
virtual void visit (ReturnExprAST *ast)
 
virtual void visit (BinaryExprAST *ast)
 
virtual void visit (NumberExprAST *ast)
 
virtual void visit (StringExprAST *ast)
 
virtual void visit (BoolExprAST *ast)
 
virtual void visit (UnitExprAST *ast)
 
virtual void visit (VariableExprAST *ast)
 
virtual void visit (BlockAST *ast)
 
virtual void visit (IfExprAST *ast)
 
virtual void visit (TypedVarAST *ast)
 
- 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)
 
void add_warn (Location loc, std::string msg)
 
void add_diagnostics (Location loc, std::string msg)
 
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

LexicalStack< Typeid_to_type
 
LexicalStack< Typetypename_to_type
 
TypeMapOrdering type_map_ordering
 

Additional Inherited Members

- Public Types inherited from sammine_util::Reportee
enum  ReportKind { error , warn , diag }
 
using Report = std::tuple<Location, std::string, ReportKind>
 
using iterator = std::vector<Report>::iterator
 
using const_iterator = std::vector<Report>::const_iterator
 
- 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/17]

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

◆ postorder_walk() [2/17]

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

◆ postorder_walk() [3/17]

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

◆ postorder_walk() [4/17]

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

◆ postorder_walk() [5/17]

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

◆ postorder_walk() [6/17]

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

◆ postorder_walk() [7/17]

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

◆ postorder_walk() [8/17]

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

◆ postorder_walk() [9/17]

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

◆ postorder_walk() [10/17]

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

◆ postorder_walk() [11/17]

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

◆ postorder_walk() [12/17]

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

◆ postorder_walk() [13/17]

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

◆ postorder_walk() [14/17]

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

◆ postorder_walk() [15/17]

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

◆ postorder_walk() [16/17]

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

◆ postorder_walk() [17/17]

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

◆ preorder_walk() [1/17]

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

◆ preorder_walk() [2/17]

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

◆ preorder_walk() [3/17]

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

◆ preorder_walk() [4/17]

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

◆ preorder_walk() [5/17]

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

◆ preorder_walk() [6/17]

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

◆ preorder_walk() [7/17]

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

◆ preorder_walk() [8/17]

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

◆ preorder_walk() [9/17]

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

◆ preorder_walk() [10/17]

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

◆ preorder_walk() [11/17]

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

◆ preorder_walk() [12/17]

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

◆ preorder_walk() [13/17]

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

◆ preorder_walk() [14/17]

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

◆ preorder_walk() [15/17]

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

◆ preorder_walk() [16/17]

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

◆ preorder_walk() [17/17]

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

◆ synthesize() [1/17]

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

◆ synthesize() [2/17]

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

◆ synthesize() [3/17]

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

◆ synthesize() [4/17]

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

◆ synthesize() [5/17]

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

◆ synthesize() [6/17]

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

◆ synthesize() [7/17]

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

◆ synthesize() [8/17]

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

◆ synthesize() [9/17]

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

◆ synthesize() [10/17]

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

◆ synthesize() [11/17]

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

◆ synthesize() [12/17]

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

◆ synthesize() [13/17]

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

◆ synthesize() [14/17]

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

◆ synthesize() [15/17]

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

◆ synthesize() [16/17]

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

◆ synthesize() [17/17]

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

Member Data Documentation

◆ id_to_type

LexicalStack<Type> sammine_lang::AST::BiTypeCheckerVisitor::id_to_type

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: