-
Notifications
You must be signed in to change notification settings - Fork 0
/
ASTLoopNode.h
38 lines (29 loc) · 823 Bytes
/
ASTLoopNode.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
/*
* File: ASTLoopNode.h
* Author: daniel
*
* Created on October 8, 2013, 2:28 AM
*/
#ifndef ASTLOOPNODE_H
#define ASTLOOPNODE_H
#include "ASTStatementNode.h"
/*ASTLoopNode represents the loop statement. It is a subclass of ASTStatementNode
* and overrides the print method. It has a pointer to the first statement of
* the statement list within the loop construct.
*/
class ASTLoopNode : public ASTStatementNode {
public:
ASTLoopNode();
ASTLoopNode(const ASTLoopNode& orig);
ASTLoopNode& operator= (const ASTLoopNode &rhs);
virtual ~ASTLoopNode();
void semAnalyze();
void scopeAnalyze();
void printNode(int indent, ostream * output);
string genQuadruples();
bool returnAnalyze();
string contLabel, endLabel;
ASTStatementNode * statement;
private:
};
#endif /* ASTLOOPNODE_H */