Commit Graph

54 Commits

Author SHA1 Message Date
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 9b845e7135 eolian: add APIs to get all things of each type 2016-03-29 15:01:17 +01:00
Daniel Kolesa 32e0b60bb4 eolian: type documentation and other cleanups 2016-03-03 18:58:11 +00:00
Daniel Kolesa e061d49aac eolian: completely clean up the type system 2016-03-03 18:58:11 +00:00
Daniel Kolesa 1f58ccb49f eolian: clean up some temporary hashes 2016-03-03 18:58:11 +00:00
Daniel Kolesa c3a33653f3 eolian: separate type_to_str for decls 2016-03-03 18:58:11 +00:00
Daniel Kolesa 4c4fbfae0b eolian: remove most of the old type APIs 2016-03-03 18:58:11 +00: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 cb42da514b eolian: initial conversion of C gen and tests to new type APIs 2016-03-03 18:58:11 +00:00
Daniel Kolesa 8514c1846f eolian: add api to deal with typedecl free funcs 2016-03-03 18:58:11 +00:00
Daniel Kolesa c0287a2752 eolian: add some missing typedecl APIs 2016-03-03 18:58:11 +00:00
Daniel Kolesa cf9dbaa7da eolian: add matching APIs to get typedecls by file 2016-03-03 18:58:11 +00:00
Daniel Kolesa 6e2497bc01 eolian: add wrappers for most of typedecl APIs 2016-03-03 18:58:11 +00:00
Daniel Kolesa 55be91afc9 eolian: more relaxed safety in types API
This changes the checks in eolian type API so that you can use the various
type funcs on incompatible types, getting a NULL in return; this allows
simplified generator logic, with error handling done on generator side,
without getting annoying messages from the Eolian lib.
2015-11-19 15:29:11 +00:00
Daniel Kolesa e089908545 eolian: add eolian_type_aliased_base_get
This adds a new API function that is there mainly for convenience (see doc).
Also added/updated tests as necessary.

@feature
2015-11-18 16:02:15 +00:00
Daniel Kolesa cd12f938af eolian: remove support for old doc style on types and vars 2015-06-11 16:52:45 +01:00
Daniel Kolesa ba033a4cfc eolian: add documentation handling API
This adds new APIs that deal with the new documentation syntax
provided by Eolian. The old doc comment APIs are considered
deprecated from now on and will be removed.

@feature
2015-06-03 16:46:47 +01:00
Daniel Kolesa 3efca75615 eolian: reserve __builtin_event_cb 2015-05-29 11:19:27 +01:00
Daniel Kolesa 12fa5f5349 eolian: fix eolian_type_enum_field_c_name_get for namespaced enums 2015-05-18 16:37:42 +01:00
Daniel Kolesa 338aa7d10b eolian: use the new decl storage to retrieve REGULAR base types 2015-05-15 15:16:48 +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 44d37bb368 eolian: do not check alias/struct/enum base for builtin types 2015-05-12 17:24:17 +01:00
Daniel Kolesa 211b650c4b eolian: new API eolian_type_enum_field_c_name_get
This API allows you to retrieve the C name of an arbitrary enum field,
respecting the legacy prefix and properly uppercasing the name.
2015-05-12 17:04:54 +01:00
Daniel Kolesa 5f32c178e9 eolian: update eolian_type_base_type_get for REGULAR types 2015-05-12 14:27:24 +01:00
Daniel Kolesa 5b9ece9c85 eolian: remove support for function types
These won't be needed because of Eo callbacks. They're also difficult
to handle in bindings, so this will relieve bindings of some effort.
2014-11-27 17:20:21 +00:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Daniel Kolesa a1646ff61d eolian: remove eo_definitions 2014-09-12 13:42:53 +01:00
Daniel Kolesa 7786b96359 eolian: builtin complex types
From now on, there are 5 builtin complex types, particularly accessor, array,
iterator, hash and list. All other types are simple - they can't have a complex
part. Also, the <> now binds to the type itself, not the pointer. More builtin
complex types will be added as needed.
2014-09-08 14:53:13 +01:00
Daniel Kolesa b75014a024 eolian: refactor the struct/enum field APIs 2014-08-22 16:56:41 +01:00
Daniel Kolesa 894c9a42db eolian: field_names is now field_list (prepare for API changes) 2014-08-22 16:17:50 +01:00
Daniel Kolesa ef380c56b6 eolian: support for setting a free function to values in eo files 2014-08-21 09:26:05 +01:00
Daniel Kolesa 452497eac5 eolian: remove a bunch of pointless stringshare refs + fix in lua 2014-08-21 09:26:05 +01:00
Daniel Kolesa 732e3f417e eolian: new API: eolian_type_enum_legacy_prefix_set + generator changes
This change adds a new API to retrieve the legacy prefix for enum members
and also adds support for generating enums into the C generator. Besides that,
it prevents generation of entire struct contents when the .eo file declares
a named struct inside of a typedef - as the struct itself gets generated later on.
2014-08-21 09:26:04 +01:00
Daniel Kolesa d2205e58f8 eolian: order fields in structs and enums properly
I don't know what I was thinking, struct and enum fields need to be ordered
so now we keep a separate list around containing the field names in correct order.
2014-08-21 09:26:04 +01:00
Daniel Kolesa cf8da3790e eolian: add missing pieces of minor infra for enum 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 70bf1eac24 eolian: add infrastructure for globals and constants
Nothing parses yet, and no API is exposed. Also, move the remaining instances of file
inside of existing structures to Eolian_Object and parse basename only once.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 0e4860f215 eolian: add support for referencing classes as types
For this purpose, several other changes were made. There can now only be 1 class per file
and the class name has to match the file name. Also, I replaced the list of classes with
a hash, allowing for fast indexing (crucial for parser performance - otherwise it was
very slow).

This also adds a new API, eolian_type_class_get.
2014-08-21 09:26:02 +01:00
Daniel Kolesa fd0210f30e eolian: list_get -> get, find_by -> get_by 2014-07-23 14:13:21 +01:00
Daniel Kolesa 89ca97aceb eolian: new API: eolian_type_structs/aliases_get_by_file 2014-07-22 13:14:44 +01:00
Daniel Kolesa b81e05def5 eolian: new API: eolian_type_alias_find_by_name, remove the old APIs that take an alias name, update tests 2014-07-21 17:12:35 +01:00
Daniel Kolesa 058a3c314c eolian: rename _types to _aliases 2014-07-21 16:58:12 +01:00
Daniel Kolesa e797e40478 eolian: remove Eolian_Typedef, use Eolian_Type instead; allow eolian_type_base_type_get on aliases 2014-07-21 16:53:25 +01:00
Daniel Kolesa 460cfd9e34 eolian: type_struct_description, type_struct_file -> type_description, type_file 2014-07-21 14:39:14 +01:00
Daniel Kolesa 7117aad879 eolian: new APIs: eolian_type_full_name_get, eolian_type_naespaces_list_get 2014-07-21 14:27:23 +01:00
Daniel Kolesa 197034bfd7 eolian: type_struct_is_extern -> type_is_extern 2014-07-21 14:14:22 +01:00
Daniel Kolesa c4fd68f08a eolian: add API to retrieve filename for each typedef and struct 2014-07-21 12:26:44 +01:00