-
Notifications
You must be signed in to change notification settings - Fork 0
/
ASTMarkerNode.h
39 lines (32 loc) · 1016 Bytes
/
ASTMarkerNode.h
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
27
28
29
30
31
32
33
34
35
36
37
38
/*
* File: ASTMarkerNode.h
* Author: daniel
*
* Created on October 8, 2013, 2:07 PM
*/
#ifndef ASTMARKERNODE_H
#define ASTMARKERNODE_H
#include "ASTStatementNode.h"
#include "ASTLoopNode.h"
/*The ASTMarkerNode is used to represent the three markers: exit, continue, and null
* which only contain their key word (in the case of null it contains nothing),
* and a semi colon. It is a subclass of ASTStatementNode and only contains the
* type (exit, continue, nullstmt) it is as an ENUM.
*/
class ASTMarkerNode : public ASTStatementNode {
public:
ASTMarkerNode();
ASTMarkerNode(const ASTMarkerNode& orig);
ASTMarkerNode& operator= (const ASTMarkerNode &rhs);
virtual ~ASTMarkerNode();
void semAnalyze();
void scopeAnalyze();
void printNode(int indent, ostream * output);
string genQuadruples();
int type;
bool enabled; // Tells whether the node is within a semantically-acceptable block
ASTLoopNode * corrLoop;
private:
void loopAnalyze();
};
#endif /* ASTMARKERNODE_H */