APPEND_TP("integer")
else if (mask & EOLIAN_MASK_SINT)
APPEND_TP("signed integer")
- else if (mask & EOLIAN_MASK_SINT)
- APPEND_TP("signed integer")
+ else if (mask & EOLIAN_MASK_UINT)
+ APPEND_TP("unsigned integer")
if (mask & EOLIAN_MASK_FLOAT)
APPEND_TP("float")
}
}
+static const char *
+_get_literal_suffix(Eolian_Expression_Type etp)
+{
+ switch (etp)
+ {
+ case EOLIAN_EXPR_UINT:
+ return "U";
+ case EOLIAN_EXPR_LONG:
+ return "L";
+ case EOLIAN_EXPR_ULONG:
+ return "UL";
+ case EOLIAN_EXPR_LLONG:
+ return "LL";
+ case EOLIAN_EXPR_ULLONG:
+ return "ULL";
+ case EOLIAN_EXPR_FLOAT:
+ return "f";
+ case EOLIAN_EXPR_LDOUBLE:
+ return "L";
+ default:
+ return "";
+ }
+}
+
EAPI Eina_Stringshare *
eolian_expression_value_to_literal(const Eina_Value *v,
Eolian_Expression_Type etp)
case EOLIAN_EXPR_DOUBLE:
case EOLIAN_EXPR_LDOUBLE:
{
+ const char *ret;
char *str = eina_value_to_string(v);
- const char *ret = eina_stringshare_add(str);
+ Eina_Strbuf *buf = eina_strbuf_new();
+ eina_strbuf_append(buf, str);
free(str);
+ eina_strbuf_append(buf, _get_literal_suffix(etp));
+ ret = eina_stringshare_add(eina_strbuf_string_get(buf));
+ eina_strbuf_free(buf);
return ret;
}
default:
#include <Eina.h>
-#include "eolian_database.h"
-#include "eo_definitions.h"
+#include "eo_lexer.h"
void
database_type_del(Eolian_Type *tp)
eina_strbuf_append(buf, sp);
eina_strbuf_append_char(buf, '_');
}
- eina_strbuf_append(buf, tp->name);
+ int kw = eo_lexer_keyword_str_to_id(tp->name);
+ if (kw) eina_strbuf_append(buf, eo_lexer_get_c_type(kw));
+ else eina_strbuf_append(buf, tp->name);
}
else if (tp->type == EOLIAN_TYPE_REGULAR_STRUCT)
{
ctype = eo_lexer_get_c_type(ls->t.kw);
if (ctype)
{
- _fill_type_name(def, eina_stringshare_add(ctype));
+ _fill_type_name(def, eina_stringshare_add(ls->t.value.s));
eo_lexer_get(ls);
}
else