Decaf Compiler
Public Types | Public Attributes | List of all members
Symbol Struct Reference

Single Decaf symbol. More...

#include <symbol.h>

Public Types

enum  { SCALAR_SYMBOL, ARRAY_SYMBOL, FUNCTION_SYMBOL }
 Kind of symbol (scalar, array, or function)
 
enum  { UNKNOWN_LOC, STATIC_VAR, STACK_PARAM, STACK_LOCAL }
 Memory access location (initialized during code generation)
 

Public Attributes

enum Symbol:: { ... }  symbol_type
 Kind of symbol (scalar, array, or function)
 
char name [256]
 Name of symbol in code.
 
DecafType type
 Variable or function return type.
 
int length
 Length (for array symbols only)
 
ParameterListparameters
 List of parameters (for function symbols only)
 
enum Symbol:: { ... }  location
 Memory access location (initialized during code generation)
 
int offset
 Memory offset (initialized during code generation)
 
struct Symbolnext
 Next symbol (if stored in a list)
 

Detailed Description

Single Decaf symbol.

Might represent a scalar variable, an array, or a formal function parameter.


The documentation for this struct was generated from the following file: