blob: 79f90180cc1d0384b94fb8d24e90ea32c231ce2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#ifndef SCommonAST_h
#define SCommonAST_h
#include <stdio.h>
#include "PCCTSAST.h"
#include "SASTBase.h"
/* If you use SORCERER alone, you can subclass this to get a nice tree def */
class SORCommonAST : public SORASTBase {
protected:
SORCommonAST *_right, *_down;
int _type;
public:
SORCommonAST() { _right = _down = NULL; }
PCCTS_AST *right() { return _right; } // define the SORCERER interface
PCCTS_AST *down() { return _down; }
int type() { return _type; }
void setRight(PCCTS_AST *t) { _right = (SORCommonAST *)t; }
void setDown(PCCTS_AST *t) { _down = (SORCommonAST *)t; }
void setType(int t) { _type = t; }
virtual PCCTS_AST *shallowCopy() {return NULL;}
};
#endif
|