tan  0.0.1
tanlang::Context Class Reference

Public Member Functions

Contextoperator= (const Context &)=delete
 
 Context (const Context &)=delete
 
 Context (ASTBase *owner)
 
void set_decl (const str &name, Decl *decl)
 Register a type declaration. More...
 
Declget_decl (const str &name) const
 Search for a declaration by name. More...
 
vector< Decl * > get_decls () const
 Get all type declarations in the context. More...
 
void set_function_decl (FunctionDecl *func)
 Register a function declaration. More...
 
FunctionDeclget_func_decl (const str &name) const
 Search for a function declaration by name. More...
 
vector< FunctionDecl * > get_func_decls () const
 Get all functions registered in the context. More...
 
ASTBaseowner () const
 

Detailed Description

Definition at line 11 of file context.h.

Member Function Documentation

◆ get_decl()

Decl * Context::get_decl ( const str &  name) const

Search for a declaration by name.

Definition at line 15 of file context.cpp.

◆ get_decls()

vector< Decl * > Context::get_decls ( ) const

Get all type declarations in the context.

Definition at line 24 of file context.cpp.

◆ get_func_decl()

FunctionDecl * Context::get_func_decl ( const str &  name) const

Search for a function declaration by name.

Definition at line 32 of file context.cpp.

◆ get_func_decls()

vector< FunctionDecl * > Context::get_func_decls ( ) const

Get all functions registered in the context.

Definition at line 47 of file context.cpp.

◆ set_decl()

void Context::set_decl ( const str &  name,
Decl decl 
)

Register a type declaration.

Definition at line 10 of file context.cpp.

◆ set_function_decl()

void Context::set_function_decl ( FunctionDecl func)

Register a function declaration.

Definition at line 41 of file context.cpp.


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