forked from ThrostGunnulf/iJavaC
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsymbols.h
More file actions
50 lines (41 loc) · 914 Bytes
/
symbols.h
File metadata and controls
50 lines (41 loc) · 914 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
41
42
43
44
45
46
47
48
49
50
#ifndef SYMBOLS_H
#define SYMBOLS_H
#include "astNodes.h"
////
// Global and local table structures.
typedef struct _methodTableEntry
{
char* id;
Type type;
int isParam;
struct _methodTableEntry* next;
} MethodTableEntry;
typedef struct _methodTable
{
struct _classTable* broaderTable;
MethodTableEntry* entries;
} MethodTable;
typedef struct _classTableEntry
{
char* id;
Type type;
MethodTable* methodTable;
struct _classTableEntry* next;
} ClassTableEntry;
typedef struct _classTable
{
char* id;
ClassTableEntry* entries;
} ClassTable;
////
// Functions for table creation.
ClassTable* buildSymbolsTables(Class*);
////
// Functions for symbol finding.
Type getMethodFromGlobal(char*);
Type getSymbol(char*);
Type getSymbolFromGlobal(char*);
Type getSymbolFromLocal(char*);
Type getSymbolFromLocalOrGlobal(char*);
MethodTable* getLocalTable(char*);
#endif