tan  0.0.1
tanlang::TypePrecheck Class Reference

Perform preliminary type checking. We try our best to resolve types, and remember those that cannot be fully resolved plus their symbol dependencies. More...

#include <type_precheck.h>

Inheritance diagram for tanlang::TypePrecheck:
Collaboration diagram for tanlang::TypePrecheck:

Public Member Functions

void run_impl (Package *cu)
 
void default_visit (ASTBase *p) override
 
void VisitVarDeclImpl (VarDecl *p)
 
void VisitArgDeclImpl (ArgDecl *p)
 
void VisitAssignmentImpl (Assignment *p)
 
void VisitFunctionDeclImpl (FunctionDecl *p)
 
void VisitImportImpl (Import *p)
 
void VisitIntrinsicImpl (Intrinsic *p)
 
void VisitStructDeclImpl (StructDecl *p)
 
- Public Member Functions inherited from tanlang::CompilerAction< Derived, Input, Output >
Output run (Input input)
 
- Public Member Functions inherited from tanlang::ASTVisitor< Derived >
void VisitProgram (Program *p)
 
void VisitPackage (Package *p)
 
void VisitIdentifier (Identifier *p)
 
void VisitParenthesis (Parenthesis *p)
 
void VisitIf (If *p)
 
void VisitVarDecl (VarDecl *p)
 
void VisitArgDecl (ArgDecl *p)
 
void VisitReturn (Return *p)
 
void VisitCompoundStmt (CompoundStmt *p)
 
void VisitBinaryOrUnary (BinaryOrUnary *p)
 
void VisitBinaryOperator (BinaryOperator *p)
 
void VisitUnaryOperator (UnaryOperator *p)
 
void VisitCast (Cast *p)
 
void VisitAssignment (Assignment *p)
 
void VisitFunctionCall (FunctionCall *p)
 
void VisitFunctionDecl (FunctionDecl *p)
 
void VisitImport (Import *p)
 
void VisitIntrinsic (Intrinsic *p)
 
void VisitArrayLiteral (ArrayLiteral *p)
 
void VisitCharLiteral (CharLiteral *p)
 
void VisitBoolLiteral (BoolLiteral *p)
 
void VisitIntegerLiteral (IntegerLiteral *p)
 
void VisitFloatLiteral (FloatLiteral *p)
 
void VisitStringLiteral (StringLiteral *p)
 
void VisitNullPointerLiteral (NullPointerLiteral *p)
 
void VisitMemberAccess (MemberAccess *p)
 
void VisitStructDecl (StructDecl *p)
 
void VisitLoop (Loop *p)
 
void VisitBreakContinue (BreakContinue *p)
 
void VisitVarRef (VarRef *p)
 
void VisitPackageDecl (PackageDecl *p)
 
void visit (ASTBase *p)
 

Additional Inherited Members

- Public Types inherited from tanlang::CompilerAction< Derived, Input, Output >
using CompilerActionType = CompilerAction< Derived, Input, Output >
 
- Protected Member Functions inherited from tanlang::SemanticAnalysisAction< TypePrecheck, Package *, void >
void error (ErrorType type, ASTBase *p, const str &message)
 
void push_scope (ASTBase *scope)
 
void pop_scope ()
 
Contextctx ()
 
Contexttop_ctx ()
 
Declsearch_decl_in_scopes (const str &name)
 
T * search_node_in_parent_scopes ()
 
- Protected Member Functions inherited from tanlang::CompilerAction< Derived, Input, Output >
virtual void init (Input)
 

Detailed Description

Perform preliminary type checking. We try our best to resolve types, and remember those that cannot be fully resolved plus their symbol dependencies.

This class only operates on top-level declarations, such as functions, structs, ... And it expects all input AST nodes to contain a non-empty type.

Definition at line 23 of file type_precheck.h.


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