Ignore:
Timestamp:
Nov 6, 2016, 8:37:11 PM (3 years ago)
Author:
nmedfort
Message:

Initial work on adding types to PabloAST and mutable Var objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/ps_assign.h

    r5160 r5202  
    1414class Assign : public Statement {
    1515    friend class PabloBlock;
    16     friend class Next;
    17     friend class Var;
    1816public:
    1917    static inline bool classof(const PabloAST * e) {
     
    2523    virtual ~Assign() {
    2624    }
    27     inline PabloAST * getExpression() const {
     25    inline PabloAST * getVariable() const {
    2826        return getOperand(0);
    2927    }
    30     inline void setExpression(PabloAST * value) {
    31         return setOperand(0, value);
     28    inline PabloAST * getValue() const {
     29        return getOperand(1);
     30    }
     31    inline void setValue(PabloAST * value) {
     32        return setOperand(1, value);
    3233    }
    3334protected:
    34     explicit Assign(PabloAST * expr, String * name)
    35     : Statement(ClassTypeId::Assign, expr->getType(), {expr}, name)
    36     {
     35    explicit Assign(PabloAST * variable, PabloAST * expr)
     36    : Statement(ClassTypeId::Assign, nullptr, {variable, expr}, nullptr) {
    3737
    3838    }
Note: See TracChangeset for help on using the changeset viewer.