Thorin 1.9.0
The Higher ORder INtermediate representation
Loading...
Searching...
No Matches
thorin::Scopes Class Reference

#include <thorin/fe/scopes.h>

Public Types

using Scope = fe::SymMap< std::pair< Loc, const Def * > >
 

Public Member Functions

 Scopes ()
 
void push ()
 
void pop ()
 
Scopecurr ()
 
const Defquery (Dbg) const
 
const Deffind (Dbg) const
 Same as Scopes::query but potentially raises an error.
 
void bind (Scope *, Dbg, const Def *, bool rebind=false)
 
void bind (Dbg dbg, const Def *def, bool rebind=false)
 
void swap (Scope &other)
 

Detailed Description

Definition at line 12 of file scopes.h.

Member Typedef Documentation

◆ Scope

using thorin::Scopes::Scope = fe::SymMap<std::pair<Loc, const Def*> >

Definition at line 14 of file scopes.h.

Constructor & Destructor Documentation

◆ Scopes()

thorin::Scopes::Scopes ( )
inline

Definition at line 16 of file scopes.h.

References push().

Member Function Documentation

◆ bind() [1/2]

void thorin::Scopes::bind ( Dbg  dbg,
const Def def,
bool  rebind = false 
)
inline

Definition at line 24 of file scopes.h.

References bind().

Referenced by bind().

◆ bind() [2/2]

void thorin::Scopes::bind ( Scope scope,
Dbg  dbg,
const Def def,
bool  rebind = false 
)

Definition at line 27 of file scopes.cpp.

References thorin::error().

Referenced by thorin::IdPtrn::bind(), and thorin::TuplePtrn::bind().

◆ curr()

Scope * thorin::Scopes::curr ( )
inline

Definition at line 20 of file scopes.h.

◆ find()

const Def * thorin::Scopes::find ( Dbg  dbg) const

Same as Scopes::query but potentially raises an error.

Definition at line 21 of file scopes.cpp.

References thorin::error(), and query().

◆ pop()

void thorin::Scopes::pop ( )

Definition at line 7 of file scopes.cpp.

◆ push()

void thorin::Scopes::push ( )
inline

Definition at line 18 of file scopes.h.

Referenced by Scopes().

◆ query()

const Def * thorin::Scopes::query ( Dbg  dbg) const

Definition at line 12 of file scopes.cpp.

Referenced by find().

◆ swap()

void thorin::Scopes::swap ( Scope other)
inline

Definition at line 25 of file scopes.h.


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