Commit Graph

62 Commits

Author SHA1 Message Date
Daniel Kolesa 53a3326ddc eolian: rename any_value_ptr -> any_value_ref for consistency 2019-09-20 18:03:39 +02:00
Daniel Kolesa 267c57d0f1 eolian: remove second parameter for eolian_type_c_type_get
This has been replaced by newer APIs.
2019-09-09 18:26:49 +02:00
Lauro Moura 3edffc0c73 pyolian: Update after event and binbuf keywords
Reviewers: q66, DaveMDS

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9626
2019-08-28 10:21:18 +02:00
Daniel Kolesa 2f147f2725 eolian: rename is_class api for functions to is_static
Still needs restriction to classes only etc to be done later.

Ref https://phab.enlightenment.org/T8118
Ref https://phab.enlightenment.org/T7675
2019-08-16 16:33:37 +02:00
Daniel Kolesa 61f39eef49 eolian: remove API to get freefunc of type
This is not supported anymore. For now, the syntax is kept
around because of broken C++ tests, but afterwards it will
also be removed.
2019-07-08 16:06:42 +02:00
Daniel Kolesa 13ddc5dbc1 eolian: rename @warn_unused and its associated API
@warn_unused in syntax is now called @no_unused - this is because
"warning about unused" is a C thing (or rather, an extension to C)
and various languages might want to use stricter behavior for this.

Its associated API does the reverse now - it lets you query whether
being unused is allowed at all. This is to match future behavior
of Eolian (once it supports versioning) that will likely reverse it.

@feature
2019-05-26 17:41:22 +02:00
Daniel Kolesa d0fed247bb eolian: remove param @nonull
This has been deprecated for a while and is not strictly necessary
- as a part of an effort to stabilize Eolian, remove this. Eolian
will eventually gain support for versioning and use a reversed
behavior (i.e. no NULL by default), but the API it wlll use for
that will be very different. Features can always be added, it's
much harder to drop them.

@feature
2019-05-26 17:25:15 +02:00
Daniel Kolesa 5ea0195661 eolian: remove @nullable keyword
This was an experiment that never properly took off and was never
used by any generator. Its use was highly variable, so it could
not be relied upon. We will still want to reverse the current
behavior eventually (no null by default), but that will be
done with eo file versioning in the future.

@feature
2019-05-21 16:04:35 +02:00
Daniel Kolesa e5c9f5e76f eolian: rename eolian_event_c_name_get
This is for consistency with the new eolian_class_c_macro_get
as well as for better clarity, as c_name_get is already provided
by Object and refers to something else.
2019-05-16 15:57:39 +02:00
Daniel Kolesa b3a870c7bb eolian: rename eolian_typedecl_enum_field_c_name_get
This is to allow for better object oriented APIs, as the `c_name`
field would be inherited from Object. This also makes it more
clear in C.
2019-05-16 15:52:46 +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 db57523e78 eolian: refactor parsing API and path handling
This splits the eolian_file_parse API into two, one for parsing
files already present in the database (always by filename) and
one for parsing paths.

It fixes several bugs/leaks on the way (incorrect use of
stringshare etc.) as well as adds checking for whether there
are no conflicting filenames at scan time, for free. That means
it is now no longer possible to scan two paths which have an eo
or eot file of the same name in them.

It should also be faster now.

It also fixes T7820.

@fix
2019-05-03 17:06:49 +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
Daniel Kolesa 4b1622b5fc eolian: remove support for inlist/inarray
This feature was kind of ill-conceived and never worked properly.
Since there isn't enough time to make it work right at this point
and there are no users of it in the API, remove it for now.

It might get added in the next release cycle, in a proper form.

@feature
2019-02-28 20:28:24 +01:00
Davide Andreoli ccb3e81046 Pyolian: fixes for recent eolian changes 2018-11-28 21:39:51 +01:00
Davide Andreoli 433b561e27 Pyolian tests: 2 small improvements
1. properly use unittest infra to skip tests, otherwise we will
   forgot the commented tests

2. split the new name collision test (failing, but really cool)
   so it have a proper name and the results are more readable
2018-11-28 20:16:19 +01:00
Lauro Moura 42c92b45de pyolian: Fix tests after class renames and API change
Summary:
There is still a test failing as at least Ecore.Audio is both a
namespace and a class.

Test Plan: python test_pyolian.py

Reviewers: DaveMDS, q66

Reviewed By: q66

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7371
2018-11-27 22:25:53 +01: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
Davide Andreoli 97289953ec Pyolian: fix __repr__ for Documentation 2018-03-17 12:06:34 +01:00
Davide Andreoli 35316db2f0 Pyolian: let ctypes automatically convert types
Not a big improvement and not so much automatically...
but for sure a bit less to type :)
2018-03-17 10:49:42 +01:00
Davide Andreoli 6ef5f30a85 Pyolian: new API eolian_unit_state_get 2018-03-17 10:19:28 +01:00
Davide Andreoli 0a00e4cca1 Pyolian: new API eolian_object_unit_get
Also implemented __repr__ for Unit and State
2018-03-17 10:01:24 +01:00
Daniel Kolesa bf1e3a702f eolian: event/function_get_by_name -> by_name_get 2018-03-16 14:26:15 +01:00
Daniel Kolesa 4fd0d5b436 pyolian: remove unneeded bindings in eolian_state 2018-03-14 17:08:36 +01:00
Daniel Kolesa 3840aa453c pyolian: update name APIs 2018-03-12 15:48:25 +01:00
Davide Andreoli 2355df0e4f Pyolian: remove the useless Object.type binding
This is useless in py as Objects are never returned
directly, you always get the correct subtype (Class,
Variable, etc..). It was also clashing with Class.type
2018-03-11 15:52:52 +01:00
Davide Andreoli 6f6557e2d0 Pyolian: build the correct type from generic Object
This way all the generic Eolian_Object types are automatically
converted to the correct types (Class, Variable, etc...)
2018-03-11 14:28:51 +01:00
Daniel Kolesa c7fd43ad4e eolian: return Eolian_Object_Type from ref resolver
This needs only one enum and allows for better interop.
2018-03-09 15:25:36 +01:00
Daniel Kolesa bee3114c2c pyolian: add support for object retrieval 2018-03-08 23:07:01 +01:00
Daniel Kolesa f24fa691e7 pyolian: wipe out declaration api 2018-03-08 23:01:01 +01:00
Daniel Kolesa 10448fec97 pyolian: add Eolian_Object APIs and remove obsolete file_get ones 2018-03-08 22:48:01 +01:00
Davide Andreoli 939cb26bd9 Pyolian: new APIs for typedecl lookups 2018-03-01 17:08:56 +01:00
Davide Andreoli 20f7d6f35f Pyolian: new variable lookup APIs
with adjusted tests
2018-03-01 16:35:22 +01:00
Davide Andreoli 0a51dbf2ff Pyolian: new APIs for class retrieval
Also updated tests, generator and gendoc accordly
2018-03-01 15:51:59 +01:00
Davide Andreoli d176a37f32 Pyolian: add APIs to retrieve units from a state
Also fixed a declaration error from previous commit
2018-02-28 14:31:59 +01:00
Davide Andreoli b7de65272f Pyolian: add API to get file name of a unit 2018-02-28 14:31:59 +01:00
Davide Andreoli 686aae5572 Pyolian: add API to get children of a unit 2018-02-28 14:31:59 +01:00
Davide Andreoli cb431b2b0e Pyolian: rename Eolian to Eolian_State 2018-02-27 19:14:38 +01:00
Davide Andreoli 191ca9096e Pyolian: eolian_file_parse -> eolian_state_file_parse 2018-02-27 19:14:38 +01:00
Davide Andreoli 2e43fd3f1c Pyolian: rename path/filename retrieval APIs 2018-02-27 19:14:38 +01:00
Davide Andreoli e90c551d74 Pyolian: rename all_files_parse functions 2018-02-27 19:14:38 +01:00
Davide Andreoli 541f04aa79 Pyolian: new APIs for directory scanning
eolian_directory_scan => eolian_state_directory_add
eolian_system_directory_scan => eolian_state_system_directory_add
2018-02-27 19:14:38 +01:00
Daniel Kolesa 6a284e48c9 eolian: eolian_* -> eolian_state_*, Eolian -> Eolian_State 2018-02-27 16:12:35 +01:00
Davide Andreoli 0af53f4bc6 Pyolian: improve a bit the namespace generation
I still think that namespaces should be directly exposed by eolian.
Currently pyolian provide a namespace implementation but it's
hard to get it right, and it should be really shared between
all eolian users.
2018-02-18 09:35:53 +01:00
Davide Andreoli 94b6ad8448 pyolian: improve the doc generation 2018-01-24 22:26:40 +01:00
Davide Andreoli 9160bfe901 Pyolian: fix and tests for recent changes
q66: please leave the pyolian updating work to me,
it's harder for me to fix wrong stuff instead of just
implement myself ;)
2018-01-16 20:53:20 +01:00
Daniel Kolesa d47610a732 eolian: do not require unit when stringifying types
As it is no longer necessary to pass unit when evaluating exprs,
it is not necessary to pass it here either. Convert all the APIs
to the new style and update all instances in our tree.
2018-01-16 16:39:05 +01:00
Davide Andreoli 0179d34f0f Pyolian: add tests for recently added funcs 2018-01-14 12:05:33 +01:00
Daniel Kolesa c6436337a4 eolian: aliased_base_get funcs don't need unit 2018-01-12 18:05:13 +01:00