blob: d7be20633bba5de3245ec3b04fb10f60b9b6452e (
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
|
#pragma once
#include "symbol_type.hpp"
#include "type.hpp"
#include <variant>
#include <vector>
#include <string>
class Symbol {
public:
std::string identifier;
int line;
int column;
virtual ~Symbol() = default;
};
class FunctionDeclarationSymbol : public Symbol {
Type return_type;
std::vector<std::string> parameters;
FunctionDeclarationSymbol(std::string identifier, Type return_type, std::vector<std::string> parameters, int line, int column) : identifier(identifier), return_type(return_type), parameters(parameters), line(line), column(column) { }
};
class VariableDeclarationSymbol : public Symbol {
Type type;
VariableDeclarationSymbol
};
|