#ifndef SCC_SYMBOL_HEADER
#define SCC_SYMBOL_HEADER

#include "syntax.h"

typedef struct Symbol
{
    int level;
    char *name;

    union
    {
        // used in semantic analysis
        Syntax * declaration;

        // used in intermediate code generation
        char *var_name;

        // used in target code generation
        int address;
    };
    
} Symbol;

Symbol * symbol_new();

void symbol_delete(Symbol * symbol);

#endif
#ifndef SCC_SYMBOL_HEADER
#define SCC_SYMBOL_HEADER

#include "syntax.h"

typedef struct Symbol
{
    int level;
    char *name;

    // used in semantic analysis
    Syntax * declaration;

    // used in intermediate code generation
    char *var_name;
} Symbol;

Symbol * symbol_new();

void symbol_delete(Symbol * symbol);

#endif
--- 
+++ 
@@ -8,11 +8,18 @@
     int level;
     char *name;
 
-    // used in semantic analysis
-    Syntax * declaration;
+    union
+    {
+        // used in semantic analysis
+        Syntax * declaration;
 
-    // used in intermediate code generation
-    char *var_name;
+        // used in intermediate code generation
+        char *var_name;
+
+        // used in target code generation
+        int address;
+    };
+    
 } Symbol;
 
 Symbol * symbol_new();
Add a member for target code generation.
