-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVarCommand.h
More file actions
36 lines (28 loc) · 884 Bytes
/
Copy pathVarCommand.h
File metadata and controls
36 lines (28 loc) · 884 Bytes
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
//
// Created by roy on 12/25/18.
//
#ifndef PROJECTPART1_VARCOMMAND_H
#define PROJECTPART1_VARCOMMAND_H
#include "Command.h"
#include "DataReaderServer.h"
#include "Utilities.h"
#include "SmallLexer.h"
/**
* VarCommand implements Command, therefore could be executed.
* The execution of the command will create a new variable and
* update the relevant maps.
*/
#define BINDED_JUMP_INDEX 5
#define UNBINDED_JUMP_INDEX 4
class VarCommand : public Command {
string equalSign, valueString, pathString, varName;
DataReaderServer *dataReaderServer;
Utilities util;
SmallLexer smallLexer;
SymbolTable *symbolTable;
public:
VarCommand(DataReaderServer *dataReaderServer, SymbolTable *symbolTable, string varName, string equalSign,
string bindString, string pathString = "");
virtual int execute();
};
#endif //PROJECTPART1_VARCOMMAND_H