Commit Graph

21 Commits

Author SHA1 Message Date
Daniel Kolesa e444d43bbb eolian: handle pointer types in typechecking expr eval
Also improve expr error messages and fix Eolian tests.
2016-12-14 18:23:16 +01:00
Daniel Kolesa c813e94606 eolian: unary expr eval for floats and add a signed number mask
This adds a new mask for all signed numbers (sint + float) and
fixes unary expr evaluation for floats, as well as fixes eval
error messages.
2016-12-14 18:23:16 +01:00
Daniel Kolesa 863212f84a eolian: more old type api removals 2016-03-03 18:58:11 +00:00
Daniel Kolesa 4e40b60f06 eolian: remove retrieval funcs for type-style enums/aliases/structs 2016-03-03 18:58:11 +00:00
Daniel Kolesa e0fe487856 eolian: use fprintf(stderr) rather than eina_log for compile errors 2015-05-14 16:33:42 +01:00
Daniel Kolesa 957a89168b eolian: precompute all enum field values (faster runtime, constness) 2015-05-13 18:10:02 +01:00
Daniel Kolesa d2365e6267 eolian: allow forced retrieval of enum field values 2015-05-13 17:57:03 +01:00
Daniel Kolesa e90e3af8b5 eolian: fix evaluation of "undefined" enum fields 2015-05-13 17:15:45 +01:00
Daniel Kolesa ed58165b50 eolian: butts 2015-05-12 16:25:52 +01:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Cedric BAIL 2889a6f4c5 eolian: if the if was not taken random value would end up in exp. 2014-08-25 15:25:58 +02:00
Daniel Kolesa b75014a024 eolian: refactor the struct/enum field APIs 2014-08-22 16:56:41 +01:00
Daniel Kolesa e6954d143d eolian: drop Eina_Value
Because of Eina_Value being less than optimal in our usage, we're dropping it in Eolian.
This simplifies the code and makes it easier to bind to other languages, which
will aid new generators. Also, we're dropping long double support from eo files
and expressions as it causes an ABI breakage in gcc 4.4.
2014-08-21 09:26:05 +01:00
Daniel Kolesa a5964f0252 eolian: add comments containing original expressions to generated enum fields
This required a new API, eolian_expression_serialize.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 18c2b5082e eolian: allow usage of stack Eina_Value in expr API 2014-08-21 09:26:04 +01:00
Daniel Kolesa e2fb43b7b5 eolian: enum API implementation
This implements the previously declared APIs to manipulate enum types. Also,
it implements the appropriate lookups in expression evaluation so that you
can refer to constants and enums inside constant expressions.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 7ef5c78792 eolian: fix null serialization 2014-08-21 09:26:03 +01:00
Daniel Kolesa 788386c86c eolian: eolian_type_name_get now returns the eo name, not c name
so instead of "unsigned int" you get "uint". This is important for handling of
expressions and cross-language interoperability. You can use c_type_get on the
base type to get the C name. Also, append the appropriate suffix to number literals
when calling eolian_expression_value_to_literal.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 8c1b9ed3e2 eolian: initial API for expression evaluation
This commit also does several side (related) changes. Particularly, it updates
the Eolian C generator to use the new API, it adds missing expr types (null, char)
and masks, updates the API dealing with default return values to use expressions
instead of strings and does several fixes (mainly in lexer) around the place.
It also disallows single quoted strings as those are reserved for characters.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 90e17acd15 eolian: initial eval function with Eina_Value return 2014-08-21 09:26:03 +01:00
Daniel Kolesa d7ca6dc1c3 eolian: initial support for expression evaluation
There are now functions that let you evaluate Eolian_Expression. They're not exposed
yet. Further improvements will come as well as public API.
2014-08-21 09:26:03 +01:00