forked from enlightenment/efl
eolian: remove eo_definitions
This commit is contained in:
parent
dd6f167795
commit
a1646ff61d
|
@ -7,8 +7,6 @@ installed_eolianmainheadersdir = $(includedir)/eolian-@VMAJ@
|
|||
dist_installed_eolianmainheaders_DATA = lib/eolian/Eolian.h
|
||||
|
||||
lib_eolian_libeolian_la_SOURCES = \
|
||||
lib/eolian/eo_definitions.c \
|
||||
lib/eolian/eo_definitions.h \
|
||||
lib/eolian/eo_lexer.c \
|
||||
lib/eolian/eo_lexer.h \
|
||||
lib/eolian/eo_parser.c \
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <Eina.h>
|
||||
#include "eolian_database.h"
|
||||
#include "eo_definitions.h"
|
||||
|
||||
EAPI const Eolian_Type *
|
||||
eolian_type_alias_get_by_name(const char *name)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <Eina.h>
|
||||
#include "eolian_database.h"
|
||||
#include "eo_definitions.h"
|
||||
|
||||
EAPI const Eolian_Variable *
|
||||
eolian_variable_global_get_by_name(const char *name)
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "eo_definitions.h"
|
||||
|
||||
void
|
||||
eo_definitions_temps_free(Eo_Lexer_Temps *tmp)
|
||||
{
|
||||
Eina_Strbuf *buf;
|
||||
Eolian_Type *tp;
|
||||
Eolian_Variable *var;
|
||||
Eolian_Class *cl;
|
||||
const char *s;
|
||||
|
||||
EINA_LIST_FREE(tmp->str_bufs, buf)
|
||||
eina_strbuf_free(buf);
|
||||
|
||||
if (tmp->kls)
|
||||
database_class_del(tmp->kls);
|
||||
|
||||
EINA_LIST_FREE(tmp->type_defs, tp)
|
||||
database_type_del(tp);
|
||||
|
||||
EINA_LIST_FREE(tmp->var_defs, var)
|
||||
database_var_del(var);
|
||||
|
||||
EINA_LIST_FREE(tmp->str_items, s)
|
||||
if (s) eina_stringshare_del(s);
|
||||
|
||||
EINA_LIST_FREE(tmp->strs, s)
|
||||
if (s) eina_stringshare_del(s);
|
||||
|
||||
EINA_LIST_FREE(tmp->classes, cl)
|
||||
database_class_del(cl);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef __EO_DEFINITIONS_H__
|
||||
#define __EO_DEFINITIONS_H__
|
||||
|
||||
#include <Eina.h>
|
||||
#include <Eolian.h>
|
||||
|
||||
#include "eolian_database.h"
|
||||
|
||||
/* TEMPS */
|
||||
|
||||
typedef struct _Eo_Lexer_Temps
|
||||
{
|
||||
Eolian_Class *kls;
|
||||
Eina_List *classes;
|
||||
Eina_List *str_bufs;
|
||||
Eina_List *type_defs;
|
||||
Eina_List *var_defs;
|
||||
Eina_List *str_items;
|
||||
Eina_List *expr_defs;
|
||||
Eina_List *strs;
|
||||
} Eo_Lexer_Temps;
|
||||
|
||||
void eo_definitions_temps_free(Eo_Lexer_Temps *tmp);
|
||||
|
||||
#endif /* __EO_DEFINITIONS_H__ */
|
|
@ -700,6 +700,37 @@ eo_lexer_set_input(Eo_Lexer *ls, const char *source)
|
|||
next_char(ls);
|
||||
}
|
||||
|
||||
static void
|
||||
_temps_free(Eo_Lexer_Temps *tmp)
|
||||
{
|
||||
Eina_Strbuf *buf;
|
||||
Eolian_Type *tp;
|
||||
Eolian_Variable *var;
|
||||
Eolian_Class *cl;
|
||||
const char *s;
|
||||
|
||||
EINA_LIST_FREE(tmp->str_bufs, buf)
|
||||
eina_strbuf_free(buf);
|
||||
|
||||
if (tmp->kls)
|
||||
database_class_del(tmp->kls);
|
||||
|
||||
EINA_LIST_FREE(tmp->type_defs, tp)
|
||||
database_type_del(tp);
|
||||
|
||||
EINA_LIST_FREE(tmp->var_defs, var)
|
||||
database_var_del(var);
|
||||
|
||||
EINA_LIST_FREE(tmp->str_items, s)
|
||||
if (s) eina_stringshare_del(s);
|
||||
|
||||
EINA_LIST_FREE(tmp->strs, s)
|
||||
if (s) eina_stringshare_del(s);
|
||||
|
||||
EINA_LIST_FREE(tmp->classes, cl)
|
||||
database_class_del(cl);
|
||||
}
|
||||
|
||||
void
|
||||
eo_lexer_free(Eo_Lexer *ls)
|
||||
{
|
||||
|
@ -710,7 +741,7 @@ eo_lexer_free(Eo_Lexer *ls)
|
|||
if (ls->handle ) eina_file_close (ls->handle);
|
||||
|
||||
eo_lexer_context_clear(ls);
|
||||
eo_definitions_temps_free(&ls->tmp);
|
||||
_temps_free(&ls->tmp);
|
||||
free(ls);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
#include <Eina.h>
|
||||
#include <Eolian.h>
|
||||
#include "eo_definitions.h"
|
||||
|
||||
#include "eolian_database.h"
|
||||
|
||||
/* a token is an int, custom tokens start at this - single-char tokens are
|
||||
* simply represented by their ascii */
|
||||
|
@ -92,6 +93,18 @@ typedef struct _Lexer_Ctx
|
|||
const char *linestr;
|
||||
} Lexer_Ctx;
|
||||
|
||||
typedef struct _Eo_Lexer_Temps
|
||||
{
|
||||
Eolian_Class *kls;
|
||||
Eina_List *classes;
|
||||
Eina_List *str_bufs;
|
||||
Eina_List *type_defs;
|
||||
Eina_List *var_defs;
|
||||
Eina_List *str_items;
|
||||
Eina_List *expr_defs;
|
||||
Eina_List *strs;
|
||||
} Eo_Lexer_Temps;
|
||||
|
||||
/* keeps all lexer state */
|
||||
typedef struct _Eo_Lexer
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue