-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIdentifier.h
More file actions
40 lines (33 loc) · 887 Bytes
/
Identifier.h
File metadata and controls
40 lines (33 loc) · 887 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
37
38
39
40
#ifndef BASHCOMPILER_IDENTIFIER_H
#define BASHCOMPILER_IDENTIFIER_H
#include <string>
#include <unordered_map>
namespace ValueType {
enum Type {
Number,
Bool,
String,
Compound,
Void,
Undefined
};
}
struct IdentifierTypeStringNames {
std::unordered_map<int, std::string> idTypeStringNames;
IdentifierTypeStringNames() {
idTypeStringNames[ValueType::Number] = "Number";
idTypeStringNames[ValueType::Bool] = "Bool";
idTypeStringNames[ValueType::String] = "String";
idTypeStringNames[ValueType::Compound] = "Compound Statement";
idTypeStringNames[ValueType::Undefined] = "Undefined";
}
};
struct Identifier {
ValueType::Type Type;
double numValue;
bool boolValue;
Identifier() {
Type = ValueType::Undefined;
}
};
#endif //BASHCOMPILER_IDENTIFIER_H