summaryrefslogtreecommitdiff
path: root/src/bin/eolian
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 18:00:58 +0200
committerDaniel Kolesa <d.kolesa@samsung.com>2019-09-04 18:02:47 +0200
commit6751f011c1c621c67b671baa4d63e887af374bd4 (patch)
tree38f2c7d73e4171799e502cf61db346a1aa3c28a2 /src/bin/eolian
parent0021d1386d5828e1bd2b857a2f073327902df817 (diff)
eolian: remove the expression eval_type API
This is unnecessary because for all contexts where type is relevant the validator already makes sure the type and expression match correctly, so you don't ever need to re-validate it. If you are doing a generic case and are not sure, just use MASK_ALL.
Diffstat (limited to 'src/bin/eolian')
-rw-r--r--src/bin/eolian/sources.c2
-rw-r--r--src/bin/eolian/types.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c
index 94078fd..2d2db38 100644
--- a/src/bin/eolian/sources.c
+++ b/src/bin/eolian/sources.c
@@ -107,7 +107,7 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, const Eolian_Type
107{ 107{
108 if (exp) 108 if (exp)
109 { 109 {
110 Eolian_Value val = eolian_expression_eval_type(exp, tp); 110 Eolian_Value val = eolian_expression_eval(exp, EOLIAN_MASK_ALL);
111 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val); 111 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
112 if (lit) 112 if (lit)
113 { 113 {
diff --git a/src/bin/eolian/types.c b/src/bin/eolian/types.c
index b55a89b..d45d1ba 100644
--- a/src/bin/eolian/types.c
+++ b/src/bin/eolian/types.c
@@ -191,7 +191,7 @@ _var_generate(const Eolian_State *state, const Eolian_Variable *vr)
191 eina_strbuf_prepend_printf(buf, "#ifndef %s\n", fn); 191 eina_strbuf_prepend_printf(buf, "#ifndef %s\n", fn);
192 eina_strbuf_append_printf(buf, "#define %s ", fn); 192 eina_strbuf_append_printf(buf, "#define %s ", fn);
193 const Eolian_Expression *vv = eolian_variable_value_get(vr); 193 const Eolian_Expression *vv = eolian_variable_value_get(vr);
194 Eolian_Value val = eolian_expression_eval_type(vv, vt); 194 Eolian_Value val = eolian_expression_eval(vv, EOLIAN_MASK_ALL);
195 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val); 195 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
196 eina_strbuf_append(buf, lit); 196 eina_strbuf_append(buf, lit);
197 Eina_Stringshare *exp = eolian_expression_serialize(vv); 197 Eina_Stringshare *exp = eolian_expression_serialize(vv);
@@ -397,7 +397,7 @@ _source_gen_var(Eina_Strbuf *buf, const Eolian_Variable *vr)
397 eina_stringshare_del(ct); 397 eina_stringshare_del(ct);
398 free(fn); 398 free(fn);
399 399
400 Eolian_Value val = eolian_expression_eval_type(vv, vt); 400 Eolian_Value val = eolian_expression_eval(vv, EOLIAN_MASK_ALL);
401 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val); 401 Eina_Stringshare *lit = eolian_expression_value_to_literal(&val);
402 eina_strbuf_append(buf, lit); 402 eina_strbuf_append(buf, lit);
403 eina_strbuf_append_char(buf, ';'); 403 eina_strbuf_append_char(buf, ';');