diff options
Diffstat (limited to 'tuplr.hpp')
-rw-r--r-- | tuplr.hpp | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -164,9 +164,9 @@ struct ASTTuple : public AST, public vector<AST*> { /// Type Expression, e.g. "Int", "(Fn (Int Int) Float)" struct AType : public ASTTuple { - AType(const ASTTuple& t) : ASTTuple(t), kind(EXPR), ctype(0) {} - AType(unsigned i) : kind(VAR), id(i), ctype(0) {} - AType(ASTSymbol* n, CType t) : kind(PRIM), ctype(t) { push_back(n); } + AType(const ASTTuple& t) : ASTTuple(t), kind(EXPR), _ctype(0) {} + AType(unsigned i) : kind(VAR), id(i), _ctype(0) {} + AType(ASTSymbol* n, CType t) : kind(PRIM), _ctype(t) { push_back(n); } string str() const { switch (kind) { case VAR: return (format("?%1%") % id).str(); @@ -203,12 +203,11 @@ struct AType : public ASTTuple { } return false; // never reached } - CType type(); - enum Kind { VAR, PRIM, EXPR }; - Kind kind; - unsigned id; + CType ctype(); + enum { VAR, PRIM, EXPR } kind; + unsigned id; private: - const CType ctype; + const CType _ctype; }; /// Lifted system functions (of various types) for a single Tuplr function |