Commit Graph

348 Commits

Author SHA1 Message Date
Daniel Kolesa 4f88aa424d eolian: use units in by_file getters for typedecls 2017-05-30 17:15:54 +02:00
Daniel Kolesa 67bc32d9ac eolian: pass unit to enum get by name 2017-05-30 17:15:54 +02:00
Daniel Kolesa 9c2dae3531 eolian: pass unit to struct get by name 2017-05-30 17:15:54 +02:00
Daniel Kolesa 52a0255e38 eolian: pass unit to alias get by name 2017-05-30 17:15:54 +02:00
Daniel Kolesa 2f9c4cfef2 eolian: update tests according to unit API 2017-05-30 17:15:53 +02:00
Daniel Kolesa 653cf6bac3 eolian: make by-name variable lookups take unit 2017-05-30 17:15:53 +02:00
Daniel Kolesa da43c63ce1 eo: move event related structures and callback to C
We don't need to keep this in eo files anymore because the APIs
using them are now fully in C. This also allows removal of the
event callback builtin from Eolian.
2017-04-21 15:48:31 +02:00
Daniel Kolesa 84a584b313 eolian: fix buggy generation of auto/empty on properties
We only want to generate auto/empty function bodies on what is
specified inside the braces for properties, not for the whole
property.
2017-04-19 13:24:38 +02:00
Daniel Kolesa 53fef30db0 eolian: allow extending eolian-generated classes from within C
If you define either the macro MY_CLASS_EXTRA_OPS for normal
methods/properties or MY_CLASS_EXTRA_CLASS_OPS for class methods
or properties, which contains a comma-delimited list of ops defs
(i.e. EFL_OBJECT_OP_FUNC(...), ...) right before including the
generated my_class.eo.c file, the definitions from these will
be included in the actual class. This can be used to override
certain things in a class internally without exposing it to
Eolian, or for testing/debugging.
2017-04-13 15:56:15 +02:00
Gustavo Sverzut Barbieri 8dc853f230 ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the
installation file structure and thus eina_prefix works out of box.
2017-02-03 12:36:38 -02:00
Marcel Hollerbach ea83a197be build: add eolian 2017-01-23 18:52:34 +01:00
Daniel Kolesa c1c30cc6ce eolian tests: pass in generator path externally 2017-01-23 16:14:00 +01:00
Daniel Kolesa d8f7ade9c8 eolian: fix decl.eo in tests 2017-01-23 15:32:15 +01:00
Daniel Kolesa 95181f2d36 eolian: move base function doc API into implements
This allows us to unify retrieval of docs for both regular and
overridden funcs without having two separate APIs. It's currently
missing validation and docgen is still not adjusted properly for
it either, but at least there's this. Enables retrieval of docs
for overridden funcs by default as well.
2017-01-19 15:09:07 +01:00
Daniel Kolesa 5f8172a589 eolian: add syntax for overridding docs in implements 2017-01-18 15:33:44 +01:00
Daniel Kolesa 35c5e89269 eolian: remove/add APIs and clean up implements system
As there is no need to have separate is_auto, is_empty and
is_pure_virtual for functions and implements (each function has
its own base implement by default) I removed the function ones.
Instead, I added a way to retrieve a function's base implement
so that you can instead do the checks on the implement even when
you only have the function.

I also moved base implement build directly into the parser instead
of the database filler. That allows for significant cleanup. I
also removed distinction of implement pointers in Eolian_Function
for get and set as implements now always contain an entire thing
so the pointer was always the same anyway.

Things should still behave more or less the same, but ordering
of generated functions has changed because ordering of implements
has changed.
2017-01-16 15:55:06 +01:00
Daniel Kolesa cb3f8304e0 eolian: change eo file syntax @virtual_pure -> @pure_virtual 2017-01-13 15:44:09 +01:00
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 078a4eef71 eolian: strict function type input checks in APIs
Strictness of various Eolian APIs has been enhanced, for example
eolian_class_function_get_by_name now won't return anything if
you request an EOLIAN_PROPERTY and the found func is just an
EOLIAN_PROP_GET, and various APIs won't accept arbitrary inputs
like EOLIAN_UNRESOLVED or EOLIAN_PROPERTY now, instead you will
need to provide EOLIAN_PROP_GET, EOLIAN_PROP_SET or EOLIAN_METHOD
explicitly.

The purpose of this is to reduce potential bugs and fix ambiguous
behavior. Thanks to use of EINA_SAFETY, appropriate errors should
be printed into terminal when an API is used incorrectly.
2017-01-12 16:56:49 +01:00
Daniel Kolesa baaa482ebf eolian: fine-grained is_auto/is_empty for implements 2017-01-11 19:26:21 +01:00
Daniel Kolesa 289287f497 eolian: remove function_is_implemented
Its design does not match current Eolian and will be replaced later.
There isn't any generator using it right now, so it's safe to remove.
2017-01-11 19:26:21 +01:00
Daniel Kolesa 3797a269b6 eolian: allow new property impl syntax with auto/empty 2016-12-27 19:33:12 +01:00
Daniel Kolesa 12fad8444b eolian: fix doc tests to match generation output 2016-12-21 19:01:32 +01:00
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 2ffc93ddf9 eolian: add a reference resolver
New API function eolian_doc_token_ref_get will resolve the kind of
reference in the given token and extract the necessary data you
might need for further use, for example class and function for
methods, or struct and field for struct field. It also supports
event references that will be added into Eolian later.

EFL will be switched to the new resolver (by changing the validator
code) during the next step.
2016-12-06 19:11:17 +01:00
Daniel Kolesa 66b48f8f5d eolian: remove handling of short refs in tokenizer
Already expanded in the main lexer.
2016-12-01 17:22:19 +01:00
Daniel Kolesa d2105f99d4 eolian: add documentation tokenizer
This provides an API to tokenize Eolian docstrings. It does not
yet switch the rest of the infra to it, but it does have tests.
It doesn't verify correctness of references, as that's Eolian's
job. Therefore it's also your job to provide it with strings that
do not contain invalid references. Lua bindings are to come and
a complete switch will be done later.

@feature
2016-12-01 16:37:28 +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
Cedric BAIL 8a3e745e1a eolian: remove test for generated Eina_Promise. 2016-11-07 13:43:11 -08: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 c4f64a3390 eolian: rename ref to ptr to avoid confusion with eo refs 2016-11-02 13:06:38 +01:00
Daniel Kolesa db7b6dd7e0 eolian gen: use EWAPI for events instead of EOAPI
Apparently only methods/properties can be EOAPI.
2016-10-20 16:48:41 +02:00
Daniel Kolesa 5db3f14f85 eolian gen: use EWAPI for all generated variables 2016-10-20 16:44:20 +02:00
Daniel Kolesa 930af741b9 eolian gen: automatically uppercase names for vars/constants 2016-10-20 16:01:11 +02:00
Daniel Kolesa 02aed9a043 eolian gen: update tests to cover var generation 2016-10-20 15:22:14 +02:00
Daniel Kolesa b6113a6bd9 eolian: add API to get the C class datatype 2016-10-13 15:04:20 +02:00
Daniel Kolesa e5d016bb63 eolian: add an API to get the C name used to access the class 2016-10-12 14:56:22 +02:00
Daniel Kolesa 9553fd9640 eolian gen2: move to eolian gen (as the old one is gone) 2016-10-07 13:34:47 +02:00
Daniel Kolesa 82291e9cf5 eolian gen2: fix tests to match the new generator 2016-10-07 13:13:27 +02:00
Jean Guyomarc'h eb7a11b515 tests: add missing symbols
make check failed on OSX (clang) because of missing symbols.
2016-10-01 21:19:24 +02:00
Daniel Kolesa dd9155cf24 eolian: properly add < in struct/enum field docs
Fixes T4443.
2016-09-09 13:04:04 +02:00
Tom Hacohen 7ebf9d879d Eo: Change the way functions are registered to classes
This change lets us remove a field from the structure that leads to
around 20KiB more of saving in private dirty pages in elementary.

This also looks a bit better and feels a bit cleaner.

Breaks API and ABI.
2016-09-09 11:14:35 +01:00
Cedric BAIL 36bc9aa187 eolian: add a builtin to handle a free callback. 2016-09-08 14:58:05 -07:00
Cedric BAIL ed9dff8fbd eolian: add support for future.
Future is the read only side of a Promise. For now, I am not removing
Eina_Promise until everything is in place, but eventually the promise
type of eolian will be gone.
2016-09-08 14:58:05 -07:00
Tom Hacohen bd3801247e Eo: Make function overrides implicit.
Before this commit, function overrides were explicit. That is, you'd
have to explicitly state you were overriding a function instead of
creating a new one. This made the code a tad more complex, and was also
a bit more annoying to use. This commit removes this extra piece of
information.

This means we now store much less information per function, that will
let us further optimise out structures in the future.
2016-09-08 13:59:04 +01:00
Tom Hacohen 48f7eb02a8 Eolian: Fix tests according to recent generator changes. 2016-09-05 16:03:16 +01:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Tom Hacohen 199737add5 Eolian: Fix tests according to recent eolian changes. 2016-08-23 14:47:28 +01:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Daniel Kolesa aa5068d1e2 eolian tests: fix reference file after beta in legacy change 2016-08-15 12:50:52 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre feccbc7d83 tests: Add missing function implementations
In eolian test cases.
Not a problem when EOAPI is defined as weak, but compilation
will fail if the symbols are strong. Eg. on Solaris (it's just
a guess).

Fixes T3889
2016-07-28 20:15:23 +09: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 7584960377 eolian: implement a stringshare builtin
This implements a new builtin, stringshare, which is replaced with the right
pointer to Eina_Strinshare as necessary. This allows simplifying binding code
(it can call the proper eina APIs, deal with lifetime etc).

It also removes the extern Eina.Stringshare typedef from eina_types.eot, which
was actually incorrect and would generate invalid code in binding generators.

@feature @fix
2016-06-21 14:41:18 +01:00
Jean-Philippe Andre 7bf8da2baa evas: Rename Evas.Object to Efl.Canvas.Object
One step closer to make the EO inheritance tree look like
it's all Efl.
2016-06-21 14:35:19 +09:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +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 1a34d89d20 eolian: fix incorrect doxygen param generation
The first param on methods was skipped for some reason.

@fix
2016-06-09 14:41:12 +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 1637c21a76 eolian: support @ref on returns
This adds basic support for @ref on return types.
2016-06-07 15:26:09 +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 b1946ca5d6 eolian: utilize the new void_ptr builtin across eo files
This lets me narrow down the remaining cases of pointers across the EFL.
The void pointers will later need to be reevaluated on per-case basis and
replaced appropriately where possible/feasible.
2016-06-02 13:00:26 +01:00
Daniel Kolesa 6fc482aa9b eolian: utilize the new builtin string type across eo files 2016-05-31 16:05:43 +01:00
Felipe Magno de Almeida b613d6f1d9 eolian: Allow promises to have a second type
Promises can have a second type, which is the progress type
2016-05-23 15:58:11 -03:00
Daniel Kolesa e984e5a11a eolian: remove pointers from complex and class types
Complex types (i.e. list, array, hash, accessor etc.) now do not require
pointers with them anymore (the pointer is implied) and the same goes for
class handles. Eolian now explicitly disallows creating pointers to these
as well. This is the first part of the work to remove pointers from Eolian
completely, with the goal of simplifying the DSL (higher level) and therefore
making it easier for bindings (as well as easier API usage).

@feature
2016-05-23 15:58:33 +01:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +01:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Daniel Kolesa 1a0566452f eolian: do not generate legacy without explicit class legacy_prefix 2016-05-12 17:27:34 +01:00
Daniel Kolesa 7e94eb22b4 eolian: mark pure virtual funcs outside of implements
This is a better syntax and should've been like this in the first place.
2016-05-12 16:15:24 +01:00
Felipe Magno de Almeida 46903d76f5 eolian: Fix promise generation with multiple parameters
When generating multiple parameters, they inadvertedly got
replaced by __eo_promise. Replacing all arguments to the
promise pointer.
2016-04-29 17:15:51 -03:00
Cedric BAIL c0bce3e23e eolian: add tests for restartable event. 2016-04-20 15:53:33 -07:00
Felipe Magno de Almeida 62841aee3c eolian: Make promise eolian generation use macros for hooks
Modify the way hooks are defined and used by promise generation in
Eolian in the Eo API.

Instead of passing macro names as parameters to EO_FUNC_BODY macros,
just re-define the actual hooks when it is needed.
2016-04-11 01:28:50 -03:00
Felipe Magno de Almeida dc954d8dba eolian: add Eolian support for Eina Promises
Add a promise object to allows Eolian interface to include promises
as a way to have asynchronous value return and composibility.

The usage is like this in a .eo file:

class Foo {
   methods {
      bar {
         params {
            @inout promise: Promise<int>;
         }
      }
   }
}

Which will create the following API interface:

void foo_bar(Eo* obj, Eina_Promise** promise);

and a Eina_Promise_Owner for the implementation, like this:

void _foo_bar(Eo* obj, Private_Data* pdata, Eina_Promise_Owner* promise);

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:34:15 -07:00
Felipe Magno de Almeida 944e11559c eo: add before and after macro hooks for API generation functions
Add two parameters for macros that generate API functions in Eo so
that the generation can be customized with macros used by Eolian.

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-04-06 14:32:04 -07:00
Jean-Philippe Andre 21a7bc8a3c eolian: Fix test cases
So sorry I missed this in my weak API patch! Bad JP didn't run
make check.
2016-04-05 20:44:57 +09:00
Daniel Kolesa 22875f066c eolian: builtin support for event callback signature 2016-03-14 17:16:41 +00:00
Stefan Schmidt 35c577578a tests eolian: add test cases for type stub generations
While we had the functionality to generate type stubs header we never had
these tested in our unit test setup. Adding to simple cases for struct
and typedef which we already use for normal header generation tests.
2016-03-08 11:14:56 +01:00
Daniel Kolesa cb42da514b eolian: initial conversion of C gen and tests to new type APIs 2016-03-03 18:58:11 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Daniel Kolesa b8c820db17 eolian: fix generation tests 2016-03-03 09:53:23 +00:00
Vincent Torri 6e6a0b59ed Test rework #18: Eolian 2016-02-16 12:41:06 +00:00
Tom Hacohen 668fd4a6e8 Eo: add support for initialising eo after it has been shut down.
Until now it wasn't allowed/possible to init (eo_init) eo after it has
been shut down (eo_shutdown). This commit fixes that, so now that is
fully legal to have as many init/shutdown cycles as you want.

There was a previous workaround for this issue:
e47edc250d.

This should allow more flexibility when using the EFL in loadable
modules and in various other scenarios.

The problem is that the class_get() functions cache the previously
created class for efficiency, but the class is freed if eo is shut down,
so the cached pointer is actually invalid.
The solution to the problem was to maintain a generation count
(incremented every time we shut down eo), and compare that to a locally
saved version in class_get(). If they don't match, recreate the class,
as it has already been freed.

@feature
2016-02-04 09:27:15 +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
Vincent Torri 242278669f Eolian test: use eina_environment_tmp_get() instead of deprecated code 2015-12-14 11:14:48 +09: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 b5042ff669 eo generator: better output whitespace handling with pointers 2015-11-11 15:15:08 +00:00
Daniel Kolesa f6de200c46 eolian generator: fix test reference files 2015-11-10 16:08:03 +00:00
Daniel Kolesa a29d6aed66 eolian generator: remove useless --eo argument 2015-11-09 15:02:32 +00:00
Vitor Sousa d6055e9527 eolian: Test recognition of struct types used in methods
Summary:
Add code to unit test to check if Eolian correctly recognize a struct
name as a struct type when it is used in a method.

Add new method to struct.eo to create this test.
Update struct_ref.c accordingly.

Reviewers: tasn, q66

Differential Revision: https://phab.enlightenment.org/D3213
2015-10-21 18:15:55 +01:00
Tom Hacohen e2344b9b9e Eo: reduce memory usage across applications.
As described by Carsten in his email to edev ML titled:
"[E-devel] eo stability - i think we need to postpone that"
with the switch to Eo2 we significantly increased our usage of RW memory
pages, and thus significantly increased our memory usage when running
multiple applications.

The problem was that during the migration to Eo2 the op id cache and the
op description arrays were merged, causing the op description arrays to
no longer be RO. This patch enables users of Eo (mainly Eolian) to
declare those arrays as const (RO) again, saving that memory.

There might be performance implications with this patch. I had to remove
the op desc array sorting, and I used a hash table for the lookup. I
think the op desc sorting doesn't really affect performance because that
array is seldom accessed and is usually pretty short. The hash table
is not a problem either, because it's  behind the scenes, so it can be
changed to a more efficient data structure if the hash table is not good
enough. The hash table itself is also rarely accessed, so it's mostly
about memory.

Please keep an eye for any bugs, performance or excessive memory usage.
I believe this should be better on all fronts.

This commit *BREAKS ABI*.

@fix
2015-09-28 18:39:15 +01:00
Daniel Kolesa 17f4c45fc9 eolian tests: strip trailing newlines for ref file compare 2015-09-28 18:50:07 +01:00
Daniel Kolesa 76bc86716e Eolian generator: remove sentinel generation 2015-09-28 16:18:29 +01:00
Tom Hacohen 9328524da4 Eo: Remove EO_SENTINEL.
This was never really needed because we always had the count.
Removing this now because we are already breaking API and ABI.
2015-09-28 15:52:50 +01:00
Tom Hacohen 37f84b7e96 Eo: Drop doc field from ops and events.
This hasn't been used for a while. Since we are going to break Eo a bit anyway
it's a good opportunity to drop this.

This may cause a slight performance issues with legacy events, such as
smart callbacks. This shouldn't really be a problem as we've migrated away from
them. If it does, we need to migrate the remaining parts. Only relevant
for callbacks that are added before the classes are created, which
shouldn't be possible except for smart, only for old evas callbacks.
2015-09-28 15:09:16 +01:00
Daniel Kolesa a9968b975f eolian/generator: generation of doxygen @note and @warning tags
@feature
2015-09-14 14:10:32 +01:00
Daniel Kolesa 3f1d29f1ec eolian: remove support for old style docs completely 2015-09-03 15:42:01 +01:00
Daniel Kolesa 1701ba6a06 eolian: class members now inherit their class's since tag 2015-08-11 10:31:42 +01:00
Daniel Kolesa aa65c7ef5b eolian: @since no longer needs to be its own paragraph in docs
However, it still terminates the doc.
2015-08-06 16:53:41 +01:00
Daniel Kolesa 8ed6417196 eolian/generator: generate @ingroup in doc comments properly 2015-07-14 14:42:11 +01:00
Daniel Kolesa e9688e63a5 eolian/generator: add proper generation of references
Adds proper generation of automatic references in docs.
For now events are missing.

@feature
2015-07-07 17:19:13 +01:00
Daniel Kolesa 70b7043731 eolian: initial work on doc syntax validation (disabled for now) 2015-07-07 15:21:45 +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 175e9b9055 eolian: generate correct fallback character 2015-07-03 16:17:06 +01:00
Daniel Kolesa 2e8fc41613 eolian: add support for monospace highlights in docs 2015-07-03 16:13:59 +01:00
Daniel Kolesa e9a0904768 eolian: allow trailing comma on last enum item (just like C) 2015-07-03 15:19:12 +01:00
Daniel Kolesa 660e23fd75 eolian: add new __undefined_type builtin to silence warnings 2015-06-10 16:56:37 +01:00
Daniel Kolesa 7a38f8ec21 eolian: support for @since tag in new doc comments
This is kind of ugly, but I didn't see a better way to do it without turning
this into a much more complicated parser. So this will have to do unless we
find something else to add, in which case a new doc parser will be required.

@feature
2015-06-08 15:57:15 +01:00
Daniel Kolesa a45c3db808 eolian/generator: @param[in,out] is the correct inout syntax 2015-06-05 15:09:05 +01:00
Daniel Kolesa 3f4c569341 eolian: don't emit an extra empty line in certain cases 2015-06-05 14:51:11 +01:00
Daniel Kolesa ac0113ba2b eolian/generator: generation for new documentation system
This commit adds the necessary generator logic to emit doc
comments from the new doc syntax. Old doc comments are kept
in for the time being as they're used within the EFL but they
will be removed eventually. This new generator focuses all the
important code in one place, making usage easy.

@feature
2015-06-05 12:15:51 +01:00
Daniel Kolesa af2bcfa9d1 eolian: double newline ends summary, not single
This allows you to split the summary on multiple lines
if necessary (for example to satisfy line limit)

@fix
2015-06-04 15:41:52 +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 0c729faf68 eolian: initial test file for docs (no APIs to test yet) 2015-06-03 12:06:36 +01:00
Daniel Kolesa 944e44b17d eolian: tests for declaration api 2015-06-01 15:24:00 +01:00
Daniel Kolesa 8dc8d6873d eolian/generator: clean up comment gen 2015-05-29 16:44:36 +01:00
Daniel Kolesa 83bbcc33ef eolian: tests for extern struct/typedef not-generation 2015-05-29 11:24:55 +01:00
Daniel Kolesa a7dea04b26 eolian: merge eo_file_parse and eot_file_parse 2015-05-22 17:32:21 +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 Zaoui e41d1f2cb4 Eolian/Generator: support eot files 2015-05-20 10:37:07 +03:00
Daniel Kolesa b647448f84 eolian: tests for import 2015-05-19 15:38:31 +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 058a9c9d88 eolian: new syntax for params/values/keys
Instead of "@in type name;" we now use "@in name: type;". This change
is done because of consistency with the rest of Eolian; pretty much
every other part of Eolian syntax uses the latter form.

This is a big breaking change in the .eo format, so please update your
.eo files accordingly and compile Elementary together with the EFL.

@feature
2015-05-18 16:14:31 +01:00
Daniel Kolesa d2365e6267 eolian: allow forced retrieval of enum field values 2015-05-13 17:57:03 +01:00
Daniel Kolesa 333e876629 eolian: use the actual enum type in tests 2015-05-13 17:22:37 +01:00
Daniel Kolesa e90e3af8b5 eolian: fix evaluation of "undefined" enum fields 2015-05-13 17:15:45 +01:00
Daniel Kolesa ec73644cb6 eolian: generate underscored structs as well as correct opaque struct typedefs 2015-05-13 11:14:49 +01:00
Daniel Kolesa 96d16eabb4 eolian: remove unused variables 2015-05-12 17:07:26 +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 ed58165b50 eolian: butts 2015-05-12 16:25:52 +01:00
Daniel Kolesa 6e7ab244f7 eolian: fix wrong enum tests 2015-05-12 14:37:16 +01:00
Daniel Kolesa a5ce9e5d75 eolian: API and tests for beta events 2015-05-08 14:37:02 +01:00
Daniel Kolesa fbf622db0c eolian: fix generation tests 2015-05-08 14:28:42 +01:00
Daniel Kolesa 0c07b9bea4 eolian: is_beta API plus tests 2015-05-08 14:12:27 +01:00
Daniel Kolesa ed0988a22d eolian: change all EFL .eo files to use new syntax for properties 2015-05-07 16:36:58 +01:00
Daniel Zaoui b0da753aaa Eolian/Generator: fix enums generation
Typedef word was not generated for enums. Camel case was not respected
for type definition.
Tests have been updated to check enums generation.

@fix T2400
2015-05-07 09:57:23 +03:00
Daniel Zaoui 2c5ec0b132 Eolian: Add API to retrieve an event of a class by its name
@feature
2015-05-07 09:57:15 +03:00
Daniel Kolesa 2794ca975c eolian: fix tests after the EAPI switch 2015-04-28 15:19:48 +01:00
Daniel Zaoui b191379d1d Eolian: add API to determine if a function is implemented.
This is needed in Erigo to determine if a virtual pure function can be
invoked via eo_do, as we don't want error messages to be displayed in
case of a non implementation in the Eo object.
This function works with non virtual functions too.

Tests have been provided.

@feature
2015-03-19 12:37:38 +02:00
Daniel Zaoui 57a4cae33b Eolian: add API to return the class from a function.
@feature
2015-03-16 17:32:30 +02:00
Daniel Kolesa 687e5130d8 eolian: add testcase for nullable/optional 2015-02-12 13:42:57 +00:00
michelle legrand bbba9198db eolian: add right extension to eolian_gen if we are on Windows
In previous version of this commit we checked if the _WIN32 macro was
defined. But now I am using EXEEXT from autotools to get
eolian_gen extension.

@fix
2015-02-11 17:03:37 +01:00
michelle legrand b71229ac47 check: fix tests suites on Windows
Disable timeout because we cannot fork on Windows.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-30 10:49:54 +01:00
michelle legrand 9431cde70e eolian: fix to pass make check on windows
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-30 10:49:53 +01:00
Daniel Kolesa d24220221a eolian: eolian_function_is_c_only tests 2014-12-03 15:04:40 +00:00
Daniel Kolesa d26152391f eolian: add support for @optional ctor tag
This implements task T1804.
@feature
2014-11-20 15:21:55 +00:00
Daniel Zaoui dedd8cef64 Eolian/Generator: support common descriptions for properties. 2014-10-19 13:25:06 +03:00
Daniel Zaoui af513b6af3 Eolian: add support for property descriptions.
For properties, set and get descriptions were supported but common
comment was not.
2014-10-19 13:25:06 +03:00
Daniel Kolesa 8c5f79ad1f eolian: add test for the new C class get function API 2014-10-02 11:30:36 +01:00