-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnodeTest.cpp
More file actions
29 lines (23 loc) · 1.11 KB
/
Copy pathnodeTest.cpp
File metadata and controls
29 lines (23 loc) · 1.11 KB
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
#include "Node.h"
int main(){
// SymbolTableClass ST;
// IdentifierNode * identifierOne = new IdentifierNode("sum", &ST);
// DeclarationStatementNode * declarationOne = new DeclarationStatementNode(identifierOne);
// IdentifierNode * identifierTwo = new IdentifierNode("sum", &ST);
// IntegerNode * integer = new IntegerNode(10);
// AssignmentStatementNode * assignmentStatementNode = new AssignmentStatementNode(identifierTwo, integer);
// IdentifierNode * identifierThreee = new IdentifierNode("sum", &ST);
// IntegerNode * integerTwo = new IntegerNode(20);
// PlusNode * plus = new PlusNode(identifierThreee, integerTwo);
// CoutStatementNode * cout = new CoutStatementNode(plus);
// StatementGroupNode * stateGroup = new StatementGroupNode();
// stateGroup->AddStatement(declarationOne);
// stateGroup->AddStatement(assignmentStatementNode);
// stateGroup->AddStatement(cout);
// BlockNode * blockNode = new BlockNode(stateGroup);
// ProgramNode * programNode = new ProgramNode(blockNode);
// StartNode * start = new StartNode(programNode);
// system("pause");
// delete start;
return 0;
}