/* =====================================
 * Generated by Mod-c 0.26.5
 * HEADER symbol MODULE
 * ===================================== */

#ifndef MODC_MODULE_symbol_H
#define MODC_MODULE_symbol_H

#include <stdint.h>
#include <stdbool.h>
#include <assert.h>

#define nil ((void *)0)
#define NIL nil
typedef uint8_t byte;
typedef const char* string;
typedef int integer;
typedef unsigned int cardinal;
typedef float real;

/**
 * Symbol table related stuff.
 */

/* === IMPORT === */
#include "stddef.h"

/* === IMPORT === */
#include "arena.h"

/* === IMPORT === */
#include "ttype.h"

/* === IMPORT === */
#include "symkind.h"

/* === IMPORT === */
#include "node.h"

/* === TYPE EXPORT === */
typedef Node* pNode;

/** TTymbol structure */

/* === TYPE EXPORT === */
typedef struct TSymbol TSymbol;
typedef struct TSymbol {
    SymbolKind kind;
    const char* name;
    size_t name_len;
    TType* symbol_type;
    pNode decl;
    bool is_exported;
    bool has_const_value;
    integer const_value;
    bool is_method_instance;
} TSymbol;

/* === TYPE EXPORT === */
typedef TSymbol* pTSymbol;

/* === TYPE EXPORT === */
typedef pTSymbol* ppTSymbol;

/**
 * Function symbol_create()
 * @param arena
 * @param kind
 * @param name
 * @param name_len
 * @param decl
 * @return ^TSymbol
 */

/* === PROC/FUNC EXPORT === */
TSymbol* symbol_create(Arena* arena, SymbolKind kind, const char* name, size_t name_len, pNode decl);

/**
 * Function symbol_kind_name()
 * @param kind
 * @return const ^char
 */

/* === PROC/FUNC EXPORT === */
const char* symbol_kind_name(SymbolKind kind);

void symbol(void);

#endif /* MODC_MODULE_symbol_H */
