blob: 94fe918a127820a2a40d0aff0a9d300f4967ed48 (
plain)
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
|
#pragma once
#include <string>
#include <vector>
#include "symbol_type.h"
class Symbol {
public:
explicit Symbol(std::string name, SymbolType type, std::string data_type, int scope_level);
std::string getName();
SymbolType getSymbolType();
std::string getDataType();
int getScopeLevel();
bool isInitialized();
void setInitialized(bool init);
bool isParameter();
void setParameter(bool is_param);
std::vector<std::string> getParameterTypes();
void setParameterTypes(std::vector<std::string> types);
std::string getReturnType();
void setReturnType(std::string type);
int getLineDeclared();
void setLineDeclared(int line);
std::string toString();
private:
std::string symbol_name;
SymbolType symbol_type;
std::string data_type;
int scope_level;
bool is_initialized;
bool is_parameter;
std::vector<std::string> parameter_types;
std::string return_type;
int line_declared;
int column_declared;
};
|