Commit Graph

92 Commits

Author SHA1 Message Date
Daniel Kolesa 692ae7adb6 eolian: use consistent pure_virtual naming in API
Previously one API used just virtual (incorrect) and one used
virtual_pure (which just sounds weird). So unify with a single
name, pure_virtual, similar as in other lanugages.

This does not change eo file syntax yet.
2017-01-13 15:40:29 +01:00
Daniel Kolesa a70645e154 eolian: consistent and cleaner error values from APIs
Now all error/unknown/etc values returned from APIs are zero,
previously it was a mix of zeroes and minus ones. Also, some
enums that had no error/invalid value before have one now, which
allows for better distinction between what is an error and what
is an intended result.
2017-01-13 15:26:05 +01:00
Daniel Kolesa baaa482ebf eolian: fine-grained is_auto/is_empty for implements 2017-01-11 19:26:21 +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 2f5db8c7d5 docgen: migrate to new Eolian-provided tokenizer 2016-12-09 17:19:03 +01:00
Daniel Kolesa e8d1ddd86c elua: add bindings to new Eolian APIs 2016-12-08 17:20:22 +01:00
Daniel Kolesa 8002b3b24e eolian: remove parsing of pointers and the corresponding APIs
Everything should be done via the new ptr() system now.
2016-11-10 16:20:19 +01:00
Daniel Kolesa f399e77a92 eolian: rename is_ref API to is_ptr to match syntax 2016-11-03 14:22:21 +01:00
Daniel Kolesa 82ef73ca18 eolian: remove type silencing stuff entirely
this was useful during transition, but not anymore
2016-10-25 18:02:23 +02:00
Daniel Kolesa 41abda37f6 elua: event method fixes in eolian bindings 2016-07-12 11:09:05 +01:00
Daniel Kolesa 96b960c953 elua: support is_restart for events in eolian api 2016-07-07 15:15:03 +01:00
Daniel Kolesa ab2e608239 eolian: add support for static and terminated arrays
Adds two new type types, STATIC_ARRAY and TERMINATED_ARRAY. Static arrays are
only allowed as struct members right now - they translate to regular C static
arrays (allowing them elsewhere wouldn't be good, as C isn't very good at
working with the size information). Terminated arrays are basically sequences
of data terminated at the end. The base type of static arrays can be any type
that is not marked ref (explicit ref may get allowed later). The base type of
terminated arrays has the same restriction plus that it has to be either
implicitly reference type (i.e. translating to pointer in C), integer type
or a character. In case of ref types, the terminator is NULL. In case of
integer types, the terminator is a zero. In case of character types, the
terminator is also a zero (null terminator like C strings).

@feature
2016-06-30 16:59:21 +01:00
Daniel Kolesa 33c147f6d4 eolian: remove the unnecessary subtypes API
Inner type can now be retrieved as a base type of the type.
If the type has two inner types or more, there is a new API that allows you to
get the second inner type by calling it on the first one (same would apply to
getting third via second etc.).

This API is simpler to use and doesn't require an iterator.
2016-06-10 14:28:19 +01:00
Daniel Kolesa 375179b47f eolian: support @protected for accessors (get/set)
Previously it was only possible to set it for the whole property.

@feature
2016-06-09 16:55:24 +01:00
Daniel Kolesa b87c4f6de8 eolian: refine the ref system to suit more cases
Now references are first class (but still restricted to one level). Unlike
pointers they only mark the type instead of introducing a whole new type.
2016-06-08 15:49:09 +01:00
Daniel Kolesa 7cf7cba88e eolian: remove the c_type_named_get APIs
These have inconsistent behavior and are generally unnecessary, so I'm
removing them. Use the c_type_get funcs instead.
2016-06-06 15:50:15 +01:00
Daniel Kolesa 9752c44a48 eolian: add a new references system to help replace pointers
It's now possible to mark struct fields and function params as "references",
which causes them to become pointers in C (in bindings, they become whatever
is necessary). They're not a part of the type and are much more restricted
than pointers, allowing bindings to be easier. This system will be gradually
utilized and expanded as required.

@feature
2016-06-06 15:28:10 +01:00
Daniel Kolesa 525dcaa6ab eolian: fix invalid type_type mapping in lua bindings 2016-04-18 16:09:21 +01:00
Daniel Kolesa d8285ce651 eolian: fix object scope def in lua bindings 2016-04-18 13:50:28 +01:00
Daniel Kolesa 9b845e7135 eolian: add APIs to get all things of each type 2016-03-29 15:01:17 +01:00
Daniel Kolesa b1070f9478 eolian: fix typos in symbol names in lua bindings 2016-03-29 11:13:48 +01:00
Daniel Kolesa 863212f84a eolian: more old type api removals 2016-03-03 18:58:11 +00:00
Daniel Kolesa 8614ee1e91 elua: update eolian bindings to new typedecl api 2016-03-03 18:58:11 +00:00
Daniel Kolesa 30bc1d285b eolian: allow silencing of type errors in validation
This allows generators to silence type errors in validation in order
to reduce duplicate error messages when generating multiple files.
Also adjusted the C generator to only emit type errors when generating
Eo header files.

@feature
2016-02-10 16:05:07 +00:00
Daniel Kolesa c95350016d eolian: add parsing and generation of hot events
Unfreezable events can now be marked @hot.

@feature
2016-02-02 17:55:01 +00:00
Daniel Kolesa b3867ce395 eolian: turn "undefined type" into its own EOLIAN_TYPE 2015-11-19 14:05:16 +00:00
Daniel Kolesa beacff7959 elua: add eolian_type_aliased_base_get to lua bindings 2015-11-19 13:19:22 +00:00
Daniel Kolesa 825349c7b8 eolian: improve function_full_c_name_get API
It's now generalized to work properly with legacy functions
as well as correctly append suffixes. Thus, it can be easily
used with the documentation generator and in other places.

@feature
2015-07-08 12:10:20 +01:00
Daniel Kolesa cd7a78f2a5 eolian: add API: eolian_declaration_get_by_name
Sorry for last minute new API, but this one is necessary to implement
proper verification of references in docs, which I would like to have
in 1.15. It allows you to retrieve any kind of declaration by full
namespace, so that you can check for an existence of an Eolian decl,
rather than checking every type individually.

@feature
2015-07-07 10:57:24 +01:00
Daniel Kolesa 51f49642b4 eolian: remove the outdated and ugly database printer (needs rework) 2015-06-17 14:26:07 +01:00
Daniel Kolesa cf2e94e11b elua: unexpose "old" documentation api from eolian bindings 2015-06-10 17:36:33 +01:00
Daniel Kolesa 944e9eb5b0 elua: bind recent eolian APIs to eolian lua api 2015-06-10 17:30:42 +01:00
Daniel Kolesa a7dea04b26 eolian: merge eo_file_parse and eot_file_parse 2015-05-22 17:32:21 +01:00
Daniel Kolesa 54974b074b eolian: remove const_get/const_set support
This was made obsolete by per-accessor values. It was
also hacky and i've wanted to remove it for a while.
2015-05-20 18:05:45 +01:00
Daniel Kolesa 6b91b1bd12 eolian: allow keys/values in property get/set
Sometimes it is necessary to specify a different set of values for a
getter or a setter. This commit allows such specializations. This also
renders @const_get and @const_set useless (soon to be removed).

To function correctly, this required adjustment of several public APIs
as well as deprecation of eolian_function_parameter_get_by_name.

This function was not used in any generator and was pretty much
useless in the first place, so it was removed.

@fix
2015-05-20 17:42:44 +01:00
Daniel Kolesa 5c199857c9 eolian: distinguish between get/set for property keys/values retrieval 2015-05-20 17:03:37 +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 ed58165b50 eolian: butts 2015-05-12 16:25:52 +01:00
Daniel Kolesa 4301690535 eolian: add APIs for nullable/optional (+ lua bindings) 2015-02-12 13:24:06 +00:00
Daniel Kolesa f58f59d635 elua: convert some eolian binding API results to numbers
This might fix some bugs and is the right thing to do anyway.
2015-01-09 15:45:03 +00:00
Daniel Kolesa 67c693eff1 elua: support is_c_only in lualian 2014-12-03 15:27:38 +00:00
Daniel Kolesa dc081b10e7 elua: update eolian bindings 2014-11-28 12:59:06 +00:00
Jean-Philippe ANDRE 72a3ec3fa0 Eolian lua: Fix typo in function name 2014-11-27 00:46:47 +09:00
Daniel Kolesa 3b59913b9a elua: update eolian bindings 2014-11-20 17:16:04 +00:00
Daniel Kolesa 8a9c3a028e eolian: call the methods/properties from constructors directly for now 2014-10-02 14:40:58 +01:00
Daniel Kolesa a2bde0bf96 eolian: new API: eolian_class_c_get_function_name_get
This allows bindings to easily retrieve name of the C function used to
retrieve the Eo_Class. Also, update the Lua Eolian bindings and generator.
2014-10-02 11:00:06 +01:00
Daniel Kolesa fc40591f11 elua: update eolian bindings and generator 2014-09-25 15:53:42 +01:00
Daniel Kolesa 599bee0553 elua: update eolian bindings to latest version 2014-09-09 16:30:46 +01:00
Daniel Kolesa cdd4860520 eolian: turn db validation into separate API 2014-08-21 16:35:59 +01:00