source: icGREP/icgrep-devel/icgrep/pablo/ps_assign.h @ 5160

Last change on this file since 5160 was 5160, checked in by nmedfort, 3 years ago

Initial work for incorporating Types into Pablo AST.

File size: 980 bytes
RevLine 
[3850]1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#ifndef PS_SETMARKER_H
8#define PS_SETMARKER_H
9
[4213]10#include <pablo/pe_string.h>
[3850]11
[4199]12namespace pablo {
13
[4276]14class Assign : public Statement {
[4227]15    friend class PabloBlock;
[4252]16    friend class Next;
[4404]17    friend class Var;
[3850]18public:
[4244]19    static inline bool classof(const PabloAST * e) {
[4200]20        return e->getClassTypeId() == ClassTypeId::Assign;
[4199]21    }
[4200]22    static inline bool classof(const void *) {
23        return false;
24    }
[4199]25    virtual ~Assign() {
26    }
[4657]27    inline PabloAST * getExpression() const {
[4432]28        return getOperand(0);
[4199]29    }
[4657]30    inline void setExpression(PabloAST * value) {
31        return setOperand(0, value);
[4266]32    }
[4200]33protected:
[4657]34    explicit Assign(PabloAST * expr, String * name)
[5160]35    : Statement(ClassTypeId::Assign, expr->getType(), {expr}, name)
[4200]36    {
[4414]37
[4200]38    }
[3850]39};
40
[4199]41}
42
[3850]43#endif // PS_SETMARKER_H
44
Note: See TracBrowser for help on using the repository browser.