qse/ase/lsp/env.h

50 lines
1.2 KiB
C
Raw Normal View History

2005-02-04 15:39:11 +00:00
/*
2006-10-22 13:10:46 +00:00
* $Id: env.h,v 1.8 2006-10-22 13:10:45 bacon Exp $
2005-02-04 15:39:11 +00:00
*/
2006-10-22 13:10:46 +00:00
#ifndef _SSE_LSP_ENV_H_
#define _SSE_LSP_ENV_H_
2005-02-04 15:39:11 +00:00
2006-10-22 13:10:46 +00:00
#include <sse/lsp/obj.h>
2005-02-04 15:39:11 +00:00
2006-10-22 13:10:46 +00:00
struct sse_lsp_assoc_t
2005-02-04 15:39:11 +00:00
{
2006-10-22 13:10:46 +00:00
sse_lsp_obj_t* name; // sse_lsp_obj_symbol_t
/*sse_lsp_obj_t* value;*/
sse_lsp_obj_t* value; /* value as a variable */
sse_lsp_obj_t* func; /* function definition */
struct sse_lsp_assoc_t* link;
2005-02-04 15:39:11 +00:00
};
2006-10-22 13:10:46 +00:00
struct sse_lsp_frame_t
2005-02-04 15:39:11 +00:00
{
2006-10-22 13:10:46 +00:00
struct sse_lsp_assoc_t* assoc;
struct sse_lsp_frame_t* link;
2005-02-04 15:39:11 +00:00
};
2006-10-22 13:10:46 +00:00
typedef struct sse_lsp_assoc_t sse_lsp_assoc_t;
typedef struct sse_lsp_frame_t sse_lsp_frame_t;
2005-02-04 15:39:11 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2006-10-22 13:10:46 +00:00
sse_lsp_assoc_t* sse_lsp_assoc_new (
sse_lsp_obj_t* name, sse_lsp_obj_t* value, sse_lsp_obj_t* func);
void sse_lsp_assoc_free (sse_lsp_assoc_t* assoc);
2005-02-04 15:39:11 +00:00
2006-10-22 13:10:46 +00:00
sse_lsp_frame_t* sse_lsp_frame_new (void);
void sse_lsp_frame_free (sse_lsp_frame_t* frame);
sse_lsp_assoc_t* sse_lsp_frame_lookup (sse_lsp_frame_t* frame, sse_lsp_obj_t* name);
2005-09-20 09:17:06 +00:00
2006-10-22 13:10:46 +00:00
sse_lsp_assoc_t* sse_lsp_frame_insert_value (
sse_lsp_frame_t* frame, sse_lsp_obj_t* name, sse_lsp_obj_t* value);
sse_lsp_assoc_t* sse_lsp_frame_insert_func (
sse_lsp_frame_t* frame, sse_lsp_obj_t* name, sse_lsp_obj_t* func);
2005-02-04 15:39:11 +00:00
#ifdef __cplusplus
}
#endif
#endif