Commit Graph

44 Commits

Author SHA1 Message Date
Daniel Kolesa 71cd89c580 eolian: expose most API as stable
There is still some TODO with builtin types, parameter
directions and prefixes, which will be resolved in the
next commits.
2019-09-25 18:26:07 +02:00
Daniel Kolesa ba8e4dc17f eolian: use c_name when building complex C symbol names 2019-05-30 17:01:27 +02:00
Daniel Kolesa 4ab1f2388e eolian: add API to retrieve the C name of an object
This is to prepare for type/class renaming support. This adds
the necessary API to retrieve C-specific names. Other refactoring
is necessary elsewhere for now.

This also renames the old API eolian_class_c_name_get to
eolian_class_c_macro_get to avoid conflict as well as clarify
the intention.
2019-05-16 15:43:52 +02:00
Daniel Kolesa 6312cafe20 eolian: move from eo_prefix to c_prefix 2019-05-09 16:17:44 +02:00
Daniel Kolesa cf200a7d28 eolian: remove legacy handling API and most of generation
Summary:
This removes all Eolian API that deals with handling of legacy
code. It also removes the code using it in the generator as well
as bindings, but for now keeps generation of .eo.legacy.h types,
as there are still instances in our codebase where things are
otherwise broken. We can remove the rest once that is resolved.

Reviewers: zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8255
2019-03-08 10:12:09 -05:00
Daniel Kolesa 1a17aff85f eolian: add support for marking type declarations beta
Summary:
This also simplifies the beta checking API by unifying it under
objects (makes much more sense that way) and reworks the validator
to have betaness support within its context state, allowing checks
to be done easily in any place.

The betaness checks are disabled for types for the time being,
because otherwise there are too many errors (types are assumed
to be stable as they are not tagged beta, but they reference beta
classes all over the place). Set EOLIAN_TYPEDECL_BETA_WARN to 1
in your environment to force enable the checks.

Reviewers: zmike, bu5hm4n, stefan_schmidt, lauromoura, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl, #eolian

Differential Revision: https://phab.enlightenment.org/D8102
2019-03-08 08:17:01 -05:00
Xavi Artigas 19fcd6e60f eolian: allow tagging complete classes as BETA
Summary:
This allows using the @beta tag in classes, like this:
class @beta Efl.Foo extends Efl.Bar { ... }

This will surround the class definition in the .eo.h file with an
EFL_BETA_API_SUPPORT #define, equivalent to tag every method and
event with @beta.

Test Plan: Nothing changes since no class uses this tag yet

Reviewers: q66, bu5hm4n, zmike

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7933
2019-02-13 18:48:02 +01:00
Marcel Hollerbach 8e487069c9 eolian: add api to access the requires field
Summary:
This is needed in order to support checking the correct regular classes
in efl#.

ref T7240
Depends on D7673

Test Plan: run ninja test / make check

Reviewers: q66, felipealmeida, segfaultxavi

Reviewed By: felipealmeida

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7240

Differential Revision: https://phab.enlightenment.org/D7674
2019-01-17 22:23:01 +09:00
Daniel Kolesa 14ce54c303 eolian: implement new inherit behavior
Eolian now separates 'parent' and 'extensions'. For regular
classes, parent is the first item in the inherits list and
extesions is the rest. For interfaces and mixins, parent is
NULL and extends is the inherits list.

The reason for this is the separation of them in syntax in near
future. It also slightly changes the behavior; since for interfaces
and mixins, parent is always NULL now, you can freely inherit from
all types of classes without needing to manually put an interface
type as the first item of the inherits list.
2018-11-23 13:57:07 +01:00
Daniel Kolesa a1ae5cd918 eolian: use new error logging for all recoverable errors 2018-03-20 17:34:51 +01:00
Daniel Kolesa bf1e3a702f eolian: event/function_get_by_name -> by_name_get 2018-03-16 14:26:15 +01:00
Daniel Kolesa edcd81ee49 eolian: update class name APIs 2018-03-12 16:03:37 +01:00
Daniel Kolesa 0f0009cb4f eolian: expose short_name/namespaces via object 2018-03-12 13:55:21 +01:00
Daniel Kolesa 665fc62916 eolian: simplify namespace handling
This is mostly a preparation for rework of name(space) APIs.
2018-03-11 17:35:13 +01:00
Daniel Kolesa c6e0b7f44e eolian: remove obsolete file_get APIs 2018-03-08 22:54:12 +01:00
Daniel Kolesa 2248131295 eolian: give objects names, and reduce duplication 2018-03-08 19:47:28 +01:00
Daniel Kolesa d6382f3f2b eolian: new APIs for class retrieval 2018-03-01 12:16:28 +01:00
Daniel Kolesa a11e70ab3c eolian: perform correct unit lookups in public API
This finally enables looking up things from the current unit
rather than from a backing storage in the Eolian state. This
also means that the benefits of having a unit system will
finally be visible.
2018-02-23 15:34:52 +01:00
Daniel Kolesa 9a5c3cfbe2 eolian: remove internal state struct (rely on external Eolian state) 2017-12-06 15:07:31 +01:00
Daniel Kolesa 8428eaa663 eolian: store aliases in temporary state 2017-12-06 15:07:31 +01:00
Daniel Kolesa 9fb3abc662 eolian: store classes in temporary state 2017-12-06 15:07:31 +01:00
Jean-Philippe Andre d49c544e81 eolian: Add API's for part enumeration
@feature
2017-11-23 15:14:41 +09:00
Jean-Philippe Andre c1d21cef89 eolian: Add some color to those warning messages
Note: This is not using eina_log, not entirely sure why, but this
doesn't prevent us from adding some color.
2017-10-31 14:52:34 +09:00
Daniel Kolesa 9699d074bc eolian: pass unit to all_classes_get 2017-05-30 17:15:53 +02:00
Daniel Kolesa 45a73a0878 eolian: pass unit to class get_by_name/file 2017-05-30 17:15:53 +02: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 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 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
Daniel Kolesa 3f1d29f1ec eolian: remove support for old style docs completely 2015-09-03 15:42:01 +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 e0fe487856 eolian: use fprintf(stderr) rather than eina_log for compile errors 2015-05-14 16:33:42 +01:00
Daniel Kolesa df0b8e3d2f eolian: free a buffer properly (fixes CID 1243233) 2014-10-03 09:26:27 +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
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Daniel Kolesa 21530bd5d8 eolian: preliminary support for new constructors section 2014-09-01 15:35:50 +01:00
Daniel Kolesa b69b90832f eolian: remove constructors section cruft 2014-08-27 15:43:47 +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 e26be1aca6 eolian: fix NULL checks in APIs that return iterators + fix tests 2014-07-23 13:45:25 +01:00
Daniel Zaoui 0efeeaf1c0 Eolian: modify APIs to return iterators instead of lists.
The change affects the C and the C++ generators.
2014-07-23 13:45:25 +01:00
Daniel Kolesa 1293dce967 eolian: API refactoring 2014-07-10 14:04:13 +01:00
Daniel Kolesa 1772ab8a1c eolian: separate database API and internals into different source files 2014-07-10 13:13:46 +01:00