Add AST element for function call expressions
This commit is contained in:
parent
cdb180e1d4
commit
066a9b7a61
|
|
@ -444,3 +444,10 @@ void vhdl_null_stmt::emit(std::ofstream &of, int level) const
|
|||
{
|
||||
of << "null;";
|
||||
}
|
||||
|
||||
void vhdl_fcall::emit(std::ofstream &of, int level) const
|
||||
{
|
||||
of << name_;
|
||||
exprs_.emit(of, level);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ private:
|
|||
vhdl_type *type_;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* A normal scalar variable reference.
|
||||
*/
|
||||
|
|
@ -94,6 +95,7 @@ private:
|
|||
std::string name_;
|
||||
};
|
||||
|
||||
|
||||
class vhdl_const_string : public vhdl_expr {
|
||||
public:
|
||||
vhdl_const_string(const char *value)
|
||||
|
|
@ -104,6 +106,7 @@ private:
|
|||
std::string value_;
|
||||
};
|
||||
|
||||
|
||||
class vhdl_expr_list : public vhdl_element {
|
||||
public:
|
||||
~vhdl_expr_list();
|
||||
|
|
@ -115,6 +118,23 @@ private:
|
|||
};
|
||||
|
||||
|
||||
/*
|
||||
* A function call within an expression.
|
||||
*/
|
||||
class vhdl_fcall : public vhdl_expr {
|
||||
public:
|
||||
vhdl_fcall(const char *name, vhdl_type *rtype)
|
||||
: vhdl_expr(rtype), name_(name) {};
|
||||
~vhdl_fcall() {}
|
||||
|
||||
void add_expr(vhdl_expr *e) { exprs_.add_expr(e); }
|
||||
void emit(std::ofstream &of, int level) const;
|
||||
private:
|
||||
std::string name_;
|
||||
vhdl_expr_list exprs_;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* A concurrent statement appears in architecture bodies but not
|
||||
* processes.
|
||||
|
|
|
|||
Loading…
Reference in New Issue