4 #ifndef ILANG_ILA_AST_AST_H__
5 #define ILANG_ILA_AST_AST_H__
39 virtual bool is_expr()
const {
return false; }
41 virtual bool is_func()
const {
return false; }
51 virtual std::ostream&
Print(std::ostream& out)
const = 0;
62 #endif // ILANG_ILA_AST_AST_H__
virtual bool is_func() const
Is type Ast::Func.
Definition: ast.h:41
virtual std::ostream & Print(std::ostream &out) const =0
Output function.
Ast(const std::string &name)
Constructor with name.
Definition: ast.h:30
InstrLvlAbsPtr host() const
Return the hosting ILA.
Definition: ast.h:44
Ast()
Default constructor.
Definition: ast.h:28
virtual bool is_expr() const
Is type Ast::Expr.
Definition: ast.h:39
The class for the Abstract Syntax Tree. An Ast object can be an expression or function definition (in...
Definition: ast.h:20
InstrLvlAbs::InstrLvlAbsPtr InstrLvlAbsPtr
Pointer type for normal use of InstrLvlAbs.
Definition: instr_lvl_abs.h:326
The basest type in the ILA structure. It can be either Ast, Instr, or InstrLvlAbs.
Definition: object.h:17
bool is_ast() const
Is type Ast.
Definition: ast.h:36
std::shared_ptr< InstrLvlAbs > InstrLvlAbsPtr
Type for forward declaration of ILA.
Definition: ast.h:23
virtual ~Ast()
Default destructor.
Definition: ast.h:32
void set_host(const InstrLvlAbsPtr &host)
Set the hosting ILA.
Definition: ast.h:46
const Symbol & name() const
Get the symbol (name).