Commit Graph

360 Commits

Author SHA1 Message Date
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
Savio Sena cbc6385026 tests/eolian: Added unit tests for eolian_function_is_constructor(). 2014-09-12 17:20:07 -03:00
Daniel Kolesa f86c2d4e5a eolian: remove accessor params feature
Temporarily replace it with @const_get and @const_set tags in values section.
2014-09-10 15:06:43 +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 Zaoui 56bad2beb0 Eolian/Generator: support @empty and @auto.
Local and base class functions are supported.
When @empty is provided, dummy functions (initializing the parameters with default
values if needed) are generated.
When @auto is provided on properties, access to internal data variables is done. On
set, it will assign parameters values to private data members. On get,
parameters are set with private data members values.

See the supplied tests as examples.

@feature
2014-09-08 10:11:01 +03:00
Daniel Kolesa d6453e8a09 eolian: further improve implement tests so they make more sense 2014-09-05 16:27:29 +01:00
Daniel Kolesa 575b08d752 eolian: improve tests (add more checks on virtual implements) 2014-09-05 16:25:20 +01:00
Daniel Kolesa 977d4fe1a6 eolian: better handling of @virtual implements
Now they're registered correctly. Also, add new API, eolian_implement_is_virtual.
Also, deal with get/set properly (when filling in additional implements)
2014-09-05 16:05:04 +01:00
Daniel Kolesa dff8d56475 eolian: use implements only to retrieve functions list
This also changes the implements list so that it also includes virtual functions.
2014-09-05 11:54:29 +01:00
Daniel Kolesa 8d9bae1172 eolian: generate implements for every method/property 2014-09-04 15:03:00 +01:00
Daniel Kolesa e67b52c514 eolian: fix auto/empty parsing/fill and add tests 2014-09-04 11:07:00 +01:00
Daniel Zaoui ffa9ad7daf Eolian/Generator: support params initialization.
This is needed when get properties or methods have to return a
value in case of failure or to initialize parameters.
The way used is to generate an intermediate function that will
initialize the parameters and then invoke the "user" function.
2014-09-03 08:36:20 +03:00
Daniel Kolesa 5e063b37a2 eolian: tests for default param values 2014-09-02 11:00:19 +01:00
Daniel Kolesa 46715c3574 eolian: move efl eo files over to the new ctor syntax 2014-09-01 15:53:35 +01:00
Daniel Kolesa 3e5da03f7d eolian: update virtual to the new syntax (as per wiki) 2014-08-29 11:40:29 +01:00
Daniel Kolesa 1a76690abf eolian/generator: remove support for custom constructors 2014-08-27 15:43:47 +01:00
Daniel Kolesa 7e95079f0f eolian: fix tests 2014-08-27 15:43:47 +01:00
Daniel Kolesa 77d148cec9 eo: migrate constructors sections to constructing methods 2014-08-27 15:43:47 +01:00
Daniel Kolesa b75014a024 eolian: refactor the struct/enum field APIs 2014-08-22 16:56:41 +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 dbd8e4cec5 eolian: fix tests 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 1888448dd4 eolian: legacy only test 2014-08-21 09:26:05 +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 913e0f09fa eolian: get rid of the data hash in Eolian_Function 2014-08-21 09:26:05 +01:00
Daniel Kolesa 1688749ce9 eolian: add support for opaque struct types (+ tests) 2014-08-21 09:26:05 +01:00
Daniel Kolesa 93726c86a3 eolian: get rid of eolian_parameter_information_get 2014-08-21 09:26:04 +01:00
Daniel Kolesa ad3dbe834b eolian: API refactoring
Remove eolian_implement_information_get. Also, fix some nasty lookup problems.
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 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 c81356e2ec eolian: working more in-depth enum test 2014-08-21 09:26:04 +01:00
Daniel Kolesa 2e3887b994 eolian: struct/enum fixes and initial test for enums 2014-08-21 09:26:04 +01:00
Daniel Kolesa d4031a21bf eolian: test for constants/globals
Also added API to retrieve value of a variable (forgot about that one)
and made it impossible to create extern constants (doesn't make sense)
as well as made it impossible to give extern globals values.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 1be7656af6 eolian: expression mode for lexer
This way we can only lex expr related tokens (operators etc.) when actually
about to parse an expression. That allows stuff like nested complex types
without the lexer treating the endings as right shift.
2014-08-21 09:26:03 +01:00
Daniel Kolesa ed28ee6aff eolian: fix tests 2014-08-21 09:26:03 +01:00
Daniel Kolesa 459638c2b9 eolian: more consistent syntax
"legacy foo" is now "legacy: foo" and "return foo" is now "return: foo".
2014-08-21 09:26:03 +01:00
Daniel Kolesa 520275c66b eolian: use newly created implicit typedefs in legacy API
Also update tests accordingly.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 6aa99c0026 eolian: better error information + fix tests
This provides better location info when failing to resolve EOLIAN_TYPE_CLASS.
Also fixes tests I forgot to push before.
2014-08-21 09:26:02 +01:00
Daniel Kolesa c88c0d9347 eolian: fix tests and fix class name comparison in parser
This fixes the Eolian testsuite as well as adds a better way to compare where a class
comes from, allowing us to guess EOLIAN_TYPE_CLASS correctly.
2014-08-21 09:26:02 +01:00
Carsten Haitzler d444e8f5f3 eolain_gen - fix implementation generation - it didn't even compile
so the test suites were useless because they didn't ecompile what was
generated. it was missing a ) at the end of calling eo_do_super to
start with. it was missing a call to do_uper fo destructors too. also
it didnt deal with the #include "blah.eo.c" at the file end either so
it produced uncompilable src at the start. again - also fix. this also
fixes test case comparisons to match the now correct generation that
compiles.
2014-08-16 13:09:17 +09:00
Daniel Kolesa 64c2b292ba eolian: preliminary eo file support for builtin true/false/null
Real API will use the new expression system, but that won't get into 1.11.
2014-07-28 10:16:15 +01:00
Daniel Kolesa e2c51100c7 eolian: add test for class methods/properties
This also fixes a bug in the Eolian parser that handles class properties.
2014-07-24 14:02:46 +01:00
Daniel Zaoui 805d746910 Eolian: Generate typedefs and structs.
This patch permits the generation of typedefs and structs in the
legacy and Eo header files. It includes tests.
2014-07-24 11:59:34 +03:00
Daniel Kolesa 5a67cc997d eolian: fix tests 2014-07-23 17:19:34 +01:00
Daniel Kolesa 572b7aa92f eolian: eolian_function_parameter_get -> eolian_function_parameter_get_by_name 2014-07-23 14:22:25 +01:00
Daniel Kolesa 88cc1167e9 eolian: eolian_parameters_get -> eolian_function_parameters_get 2014-07-23 14:17:19 +01:00
Daniel Kolesa fd0210f30e eolian: list_get -> get, find_by -> get_by 2014-07-23 14:13:21 +01:00
Daniel Kolesa e26be1aca6 eolian: fix NULL checks in APIs that return iterators + fix tests 2014-07-23 13:45:25 +01:00
Daniel Kolesa d8e54e2636 eolian: use new syntax for const methods as per wiki 2014-07-22 17:13:24 +01:00
Daniel Kolesa ab8fe63afa eolian: use @protected syntax as per wiki 2014-07-22 16:35:54 +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 b0788a546b eolian: support for typedefs in c_type_get 2014-07-22 12:11:45 +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 3798eb2f99 eolian: move eina types to namespaced syntax 2014-07-21 16:30:23 +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 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
Daniel Kolesa ae3eb2b942 eolian: make event type syntax consistent 2014-07-15 23:50:34 +01:00
Daniel Kolesa 00f99a874d eolian: add test for extern 2014-07-15 15:50:58 +01:00
Daniel Kolesa 17a6bb122b eolian: add tests for struct types plus fix a double free and name storage on the way 2014-07-14 12:11:48 +01:00
Daniel Kolesa c9744596de eolian: builtin bool type, and change the eo files to use that 2014-07-11 14:40:49 +01:00
Daniel Kolesa 5d4cc031f9 eolian: s/dflt/default/g 2014-07-11 14:30:22 +01:00
Daniel Kolesa e3cb885f10 eolian: fix testsuite 2014-07-11 11:52:45 +01:00
Daniel Kolesa 580aea04cd eolian: refactoring step six
Move Eolian_Function as well, plus fix const correctness of several API funcs.
2014-07-09 20:59:31 +01:00
Daniel Kolesa accdd50f50 eolian: refactoring step five
Move from all instances of Eolian_Type to Eolian_Type*.
2014-07-09 17:18:02 +01:00
Daniel Kolesa 52e68f986e eolian: fix tests (update according to API changes) 2014-07-09 17:04:00 +01:00
Daniel Kolesa 53fb9515e9 eolian/generator: add asterisk on inout too 2014-07-08 14:15:36 +01:00
Daniel Kolesa c8e2e8d48a eolian: @own -> own 2014-06-30 18:10:29 +01:00
Daniel Kolesa d967b6df32 eolian/tests: warning fixes 2014-06-30 17:20:39 +01:00
Daniel Kolesa e84275cc37 eolian: make tests pass 2014-06-30 17:20:39 +01:00
Daniel Kolesa ba362d350f eolian: transform tests to the new @own syntax 2014-06-30 17:20:39 +01:00
Daniel Kolesa 8221e9dd45 eolian: modify all eo files according to the new type syntax 2014-06-30 17:20:38 +01:00
Daniel Kolesa a83e28ca3d tests/eolian: fix for the new namespace syntax 2014-06-20 10:52:00 +01:00
Daniel Kolesa e9f4890747 eolian: fix end-of-file checking, move namespaces from :: to . 2014-06-20 10:46:04 +01:00
Daniel Kolesa ee24425ab5 eolian: remove semicolon termination of classes 2014-06-20 00:01:56 +01:00
Daniel Kolesa fc72ca590d eolian: allow omitting of () in class with no inherits, fix up tests 2014-06-19 16:30:18 +01:00
Daniel Zaoui 75175d7eaf Eolian/Tests: expand the usage of the generation process.
The function executing the Eolian generator was using specific options.
This patch permits addition other kinds of generation tests.
2014-06-08 12:40:12 +03:00
Daniel Zaoui dc3178404f Eolian: modify 'implement' API parameters.
The function eolian_implement_information_get was returning strings for
the class and the function. It was written in this way at the beginning
because it was not needed to verify the correctness of the class and
the function.
Now that we have the namespace feature, this function must check it,
meaning that the class and the function are now known.
So we can return them instead of returning the strings.

The generators had to find the class from the classname. It is no more
needed.

The C++ generator has been adapted to this new API.
2014-05-29 14:48:05 +03:00
Daniel Zaoui d9e177e61b Eolian: add the super invocation for developer code generation.
Now the eo_do_super is invoked for constructors overridding in a
inheriting class.
2014-05-29 10:03:45 +03:00
Daniel Zaoui d949e9b41b Eolian: fix test.
Constructor has to be defined in the constructors section and not as a
method.
2014-05-29 09:58:27 +03:00
Jean-Philippe Andre fea2c14ede Eolian test: Fix other compilation warnings 2014-05-28 11:18:51 +09:00
Jean-Philippe Andre d02ecd7d9d Eolian test: Fix test on hardened gentoo
Invalid snprintf, why declare MAX_PATH and then use PATH_MAX?
2014-05-28 11:18:37 +09:00
Daniel Zaoui 8e4700ce65 Eolian: add support of namespaces.
It is now possible to define a class in a .eo file as e.g:
Elm::Widgets::Button.
Elm and Widgets will be the namespaces of the class Button.

@feature
2014-05-26 13:56:06 +03:00
Daniel Zaoui 5b2ce095a3 Eolian/Tests: add test for events. 2014-05-26 13:56:06 +03:00
Daniel Zaoui 62082548bc Eolian: modify API to allow future scalability
Until now, the functions giving access to class information were taking
the class name as parameter.
Except the fact that we needed to search into a hash table for the internal
class structure, no flexibility is possible.

This change consists in modifying most of the APIs using the class name
with a new Eolian_Class type and adapt the code of the C and C++
generators accordingly.
2014-05-26 13:56:06 +03:00
Daniel Zaoui 1401ce36b6 Eolian/Tests: add test for overriding functions 2014-05-26 13:56:06 +03:00
Daniel Zaoui 946f845a2b Eolian/Tests: add test for consts
This tests checks the different 'const' possibilities in the .eo file
and their good parsing.
2014-05-26 13:56:06 +03:00
Daniel Zaoui 04cc813813 Eolian: add test for generator.
The test checks the dev code generator.
2014-05-26 13:56:06 +03:00
Daniel Zaoui a541aecf76 Eolian/Generator: add support for implementation source file.
By using -gi option, the generator appends the functions that are
present into the given eo file and missing into the developer file
(given via -o option as an in/out file).

@feature
2014-05-26 13:56:06 +03:00
Daniel Zaoui 8d18e2db3c Eolian/Tests: move parsing tests to a specific file 2014-05-26 13:56:06 +03:00
Daniel Zaoui e4444d2518 Eolian: add support for typedefs.
It includes parser updates, database fill and tests on basic and complex
types.

One can define types in this way:
type Evas_Coord: int; /* Simple type definition */
type List_Objects: Eina_List * <Eo *>;

@feature
2014-05-26 13:56:05 +03:00
Daniel Zaoui 183ecab18b Eolian: add API to retrieve the file name of a class 2014-04-28 08:46:19 +03:00
Daniel Zaoui 1c19d274d8 Eolian: Valgrind fixes. 2014-04-27 10:57:50 +03:00
Daniel Zaoui 7f90088232 Eolian/Generator: only requests .eo files parsing when needed.
Before this change, all the .eo files of the directories given with -I
option were parsed. Most of this information was not necessary at all,
since only the classes belonging to the inheritance of the class given
as parameter were needed.
Now, during the parsing of the given class, the inherits classes are
searched and parsed.

A condition is needed to make it work well. To find a filename for a
class, we consider the lowercase of the class name as the filename we
have to parse.
e.g, Elm_Button -> elm_button -> elm_button.eo

It considerably reduces the generation time.

A fix in the tests was needed.
2014-04-27 10:03:39 +03:00
Daniel Zaoui 6797e12bc3 Eolian/Tests: add test for complex type.
It includes too fixes for the complex type. If I had listened to Tasn,
I would have detected them a long time ago.
But he didn't insist enough. He just said:
"Write your tests, ?#@*&%! french!"
2014-04-25 16:26:05 +03:00
Daniel Zaoui d80fabefe9 Eolian/Tests: add test for ctors and dtors. 2014-04-24 15:47:51 +03:00
Daniel Zaoui 0dda45961f Eolian/Tests: Clean makefile + add return comment tests. 2014-04-24 14:20:21 +03:00
Jérémy Zurcher b9c1cc2800 Eolian: add methods and properties scope support tests 2014-04-22 20:31:11 +02:00
Daniel Zaoui d95a114db7 Eolian: infras for tests + first test 2014-04-22 09:54:24 +03:00