Daniel Kolesa
370f406d2f
eolian: properly handle errors in database_fill
...
Fixes CID 1299294.
@fix
2015-05-20 18:11:02 +01:00
Daniel Kolesa
54974b074b
eolian: remove const_get/const_set support
...
This was made obsolete by per-accessor values. It was
also hacky and i've wanted to remove it for a while.
2015-05-20 18:05:45 +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
1c5d8d14e8
eolian: remove unused variable
2015-05-20 17:07:09 +01:00
Daniel Kolesa
5c199857c9
eolian: distinguish between get/set for property keys/values retrieval
2015-05-20 17:03:37 +01:00
Daniel Kolesa
dfbb777bf1
eolian: keep track of all currently parsing files
2015-05-20 15:41:07 +01:00
Daniel Kolesa
dc4c0c64f8
eolian: unify inherits and dependencies for parsing purposes
2015-05-20 15:23:33 +01:00
Daniel Kolesa
5ca43e58c0
eolian: test for possible duplicates in deps list
2015-05-20 14:46:01 +01:00
Daniel Kolesa
30515bc946
eolian: cleaner cyclic import checks
2015-05-19 15:44:33 +01:00
Daniel Kolesa
72dcd2da03
eolian: add a functional "import" statement
2015-05-19 15:26:53 +01:00
Daniel Kolesa
8834f8e02d
eolian: initial lex/parse for import statement
2015-05-19 14:25:45 +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
338aa7d10b
eolian: use the new decl storage to retrieve REGULAR base types
2015-05-15 15:16:48 +01:00
Daniel Kolesa
8ec7d1cc48
eolian: much better and stricter redefinition checking
...
We can now check redefinitions between different types of declarations,
such as redefinition of struct as variable etc.
@feature
2015-05-15 15:11:10 +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
8c774a1b90
eolian: force specification of inner type for all complex types
2015-05-14 11:27:00 +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
e90e3af8b5
eolian: fix evaluation of "undefined" enum fields
2015-05-13 17:15:45 +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
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
5f32c178e9
eolian: update eolian_type_base_type_get for REGULAR types
2015-05-12 14:27:24 +01:00
Daniel Kolesa
a5ce9e5d75
eolian: API and tests for beta events
2015-05-08 14:37:02 +01:00
Daniel Kolesa
c8b0b06971
eolian: parsing for beta events
2015-05-08 14:22:32 +01:00
Daniel Kolesa
0c07b9bea4
eolian: is_beta API plus tests
2015-05-08 14:12:27 +01:00
Daniel Kolesa
b33e2b21a1
eolian: parse the @beta qualifier
2015-05-08 14:00:07 +01:00
Daniel Kolesa
b5a7a9b556
eolian: remove old property syntax support
2015-05-07 17:35:33 +01:00
Daniel Kolesa
e126911ba0
eolian: allow the new property syntax
2015-05-07 14:58:03 +01:00
Daniel Kolesa
95a79d5f3b
eolian: reserve @beta and @property
2015-05-07 11:35:14 +01:00
Cedric BAIL
c4cb972a83
eolian: remove the need to order the header correctly for Windows.
2015-05-07 09:53:11 +02: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
9b167d953c
eolian: fix lexer assertion failure
...
The function was missing an "else", so a wrong branch was always
executed with errors at EOF. This fixes that.
@fix
2015-05-01 11:58:05 +01:00
Daniel Kolesa
a74000a65c
eolian: specialize tmp free for typedef (avoid double free issue)
...
@fix
2015-05-01 11:48:41 +01:00
Jean-Philippe Andre
92a844fd36
Eolian: Fix clang warnings
...
Return proper type (NULL, not bool)
2015-04-21 20:11:01 +09: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
d7d9317da4
Eolian: add filename to error message
2015-03-17 09:32:54 +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
42912e6e44
eolian: convenience macro to fill base structures in parser
2015-02-18 15:41:50 +00:00
Daniel Zaoui
024c9dc858
Eolian: improve the class searching.
...
If the class is not found, we retrieve its full path if it has already
been scanned.
This patch is needed by Espion so Eolian can find the full path of a
class by its name. Espion has no way to determine it by itself.
2015-02-12 15:58:50 +02:00
Daniel Zaoui
2349e1ac41
Eolian: store the class filenames with the extensions.
...
This change is needed to give Espion a way to request the parsing of a
class when a eo_add happens and the class is not known by Eolian.
2015-02-12 15:58:50 +02:00
Daniel Kolesa
a2dd62e510
eolian: remove unneeded code
2015-02-12 13:31:42 +00:00
Daniel Kolesa
4301690535
eolian: add APIs for nullable/optional (+ lua bindings)
2015-02-12 13:24:06 +00:00
Daniel Kolesa
5b8f3a083b
eolian: write the new parameters into the database
2015-02-12 11:32:34 +00:00
Daniel Kolesa
fff83acef3
eolian: check the other boolean rather than itself
2015-02-12 11:19:24 +00:00
Daniel Kolesa
be6415d662
eolian: parsing of @nullable and @optional args on func params
2015-02-12 11:14:45 +00:00
Daniel Kolesa
4a14bbd0f5
eolian: fix unary expression parsing (correctly consume tokens)
...
Also disable typed expression validation for now. The interfaces are not
finished yet so some things will fail validation because of unexistent
type definitions.
Fixes T2064.
@fix
2015-01-29 11:12:41 +00:00
Daniel Kolesa
49aebd063e
eolian: add eolian_function_is_c_only
...
This function allows us to mark functions that are not bindable.
Also remove some obsolete code.
2014-12-03 14:59:24 +00:00
Daniel Kolesa
e39686b077
eolian: new APIs for filenames
...
Adds 4 new APIs for getting .eo and .eot file names and file paths.
2014-11-28 12:59:06 +00: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
Daniel Kolesa
3a8e08f747
eolian: one func for filling in namespaces
2014-11-21 14:12:40 +00:00
Daniel Kolesa
423629f817
eolian: get rid of the PARSE_SECTION macro nonsense
2014-11-21 13:59:42 +00:00
Daniel Kolesa
6448803ab0
eolian: forgot to add prototype to header
2014-11-20 17:13:12 +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
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
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
Daniel Kolesa
7cbac89ec3
eolian: fix a nasty segfault (forgot to update some old code during refactoring)
2014-10-01 14:34:33 +01:00
Daniel Kolesa
8631212e45
eolian: remove the need to pass prefix to eolian_function_full_c_name_get
2014-09-25 15:37:18 +01:00
Daniel Kolesa
13a9650491
eolian: properly replace commas in event_c_name_get and cleanup generator
2014-09-25 15:09:36 +01:00
Daniel Kolesa
a1552fe6a9
eolian: new API: eolian_event_c_name_get
2014-09-25 14:58:53 +01:00
Mike Blumenkrantz
5375e154fe
fix config.h inclusion across the tree
2014-09-23 15:56:46 -04:00
Daniel Kolesa
99c56369f2
eolian: stringshare del note in 2 more functions
2014-09-22 13:19:50 +01:00
Daniel Kolesa
4ffc6d92c0
eolian: update docs
2014-09-22 13:16:57 +01:00
Daniel Kolesa
0be3aefdc7
eolian: remove some unused funcs
2014-09-22 12:47:30 +01:00
Stefan Schmidt
eebeca2900
docs/eolian: Add main landing page for Eolian documentation
2014-09-19 15:27:33 +02:00
Daniel Kolesa
bcff50fb72
eolian: initialize property type correctly
2014-09-16 17:12:52 +03:00
Kai Huuhko
d0ee1bd142
Eolian: Fix a c&p mistake in doc
2014-09-15 14:38:12 +03:00
Kai Huuhko
09d6592260
Eolian: Fix a few warnings
...
"function declaration isn't a prototype"
void was forgotten from empty params list
2014-09-15 14:34:33 +03:00
Savio Sena
2d39b359fb
eolian: Added eolian_function_is_constructor().
...
This patch adds a list of strings called 'ctor_of' to
_Eolian_Function. This list will contain all classes in which this
function is a constructing function.
ctor_of is filled in two moments:
* When filling the constructors of a class, class->full_name is inserted
in the 'ctor_of' of each constructor's function.
* When filling the implements of a class, if the function is a
constructor of its superclass it also becomes a constructor of the
current class, so class->full_name is also inserted in the 'ctor_of'
of each implement's function.
eolian_function_is_constructor gets a func and klass arguments. It goes
through ctor_of of func and returns EINA_TRUE if klass->full_name is
found, otherwise it returns EINA_FALSE.
2014-09-12 16:51:37 -03:00
Daniel Kolesa
3d8069f226
eolian: remove str_items from temps
2014-09-12 15:04:18 +01:00
Daniel Kolesa
87559458f2
eolian: get rid of a list
2014-09-12 15:01:10 +01:00
Daniel Kolesa
f8cef784a8
eolian: less messy initialization checks
2014-09-12 14:20:52 +01:00
Daniel Kolesa
a1646ff61d
eolian: remove eo_definitions
2014-09-12 13:42:53 +01:00
Daniel Kolesa
dd6f167795
eolian: more temp cleanups
2014-09-12 13:35:48 +01:00
Daniel Kolesa
212d500016
eolian: remove some more temps
2014-09-12 13:30:24 +01:00
Daniel Kolesa
25d57a4b44
eolian: remove some unnecessary temps
2014-09-12 13:25:26 +01:00
Daniel Kolesa
6fc1b18e1b
eolian: more helpful error reporting
2014-09-11 13:55:42 +01:00
Daniel Kolesa
44cecb6a87
eolian: simplify more fill code
2014-09-11 11:48:46 +01:00
Daniel Kolesa
2358e63d60
eolian: remove most of class fill
2014-09-11 11:29:54 +01:00
Daniel Kolesa
9915b0da55
eolian: remove more parts of fill
2014-09-11 11:21:04 +01:00
Daniel Kolesa
d85a3f6015
eolian: cleanup class fill
2014-09-11 11:02:51 +01:00
Daniel Kolesa
f55572d79e
eolian: remove Eo_Class_Def (fill bits still remaining)
2014-09-11 10:50:48 +01:00
Daniel Kolesa
88327c1d9d
eolian: remove leftover code
2014-09-11 10:37:41 +01:00
Daniel Kolesa
12ce49db01
eolian: remove Eo_Method_Def
2014-09-11 10:29:48 +01:00
Daniel Kolesa
2219c0329d
eolian: remove Eo_Property_Def
2014-09-10 17:15:31 +01:00
Daniel Kolesa
588f2dd9db
eolian: property cleanup
2014-09-10 16:46:34 +01:00
Daniel Kolesa
10843dc0e2
eolian: remove Eo_Ret_Def
2014-09-10 16:41:02 +01:00
Daniel Kolesa
ffb8e79034
eolian: remove accessor structures
2014-09-10 15:53:38 +01:00
Daniel Kolesa
faa24705c8
eolian: we can only have 2 accessors
2014-09-10 15:22:04 +01: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
9aff324457
eolian: remove Eo_Param_Def, reduce allocations, simplify code
2014-09-10 14:24:41 +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
d74eb93580
eolian: remove bool returns from some cases that cannot fail
2014-09-05 16:30:56 +01:00
Daniel Kolesa
b7c55642fa
eolian: cleanup
2014-09-05 16:21:39 +01:00
Daniel Kolesa
7ba2dbe238
eolian: remove some ifs in database_fill
2014-09-05 16:19:56 +01:00
Daniel Kolesa
70469cb44d
eolian: some minor refactoring
2014-09-05 16:18:47 +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
00192bd15e
eolian: update docs on implements
2014-09-05 12:01:37 +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
99b03d4f3c
eolian: skip UTF-8 BOM if present
2014-09-05 10:04:11 +01:00
Daniel Kolesa
0c0d639693
eolian: cache function in implements where possible to get O(1) lookup
2014-09-04 15:15:38 +01:00
Daniel Kolesa
8d9bae1172
eolian: generate implements for every method/property
2014-09-04 15:03:00 +01:00
Daniel Kolesa
e75ded5e3f
eolian: prepare for implements list expansion
...
As the implements list will soon contain all methods and properties,
do some preparations. The Eolian library now fills in class field in
implements early on when the implement is local. The Eolian C generator
now checks for local implements and skips them (so that things don't break).
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 Kolesa
0d6b4fad8f
eolian: wrong condition fix
2014-09-03 14:44:23 +01:00
Daniel Kolesa
5827486c3d
eolian: APIs to check auto/empty on a function
2014-09-03 14:26:09 +01:00
Daniel Zaoui
12b0550301
Eolian/Parser: fix wrong type allocation.
...
fix CID 1234600
2014-09-03 11:28:05 +03:00
Daniel Kolesa
0998f2af5c
eolian: new APIs for expression analysis
...
This adds a few new APIs to retrieve the type of an expression, operators
for binary and unary expressions, lhs/rhs for binary expressions, expr for
unary expressions and value for other expressions.
2014-09-02 13:33:04 +01:00
Daniel Kolesa
9ffe700aac
eolian: simplify expr serialize and fix null/bool case
2014-09-02 13:07:16 +01:00
Daniel Kolesa
231b2f3044
eolian: enum validation fix
2014-09-02 12:39:58 +01:00
Daniel Kolesa
b13bafabba
eolian: support for default param values where applicable + API
2014-09-02 10:47:55 +01:00
Daniel Kolesa
d2702a4fad
eolian: remove @constructor syntax
2014-09-01 16:02:40 +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
21530bd5d8
eolian: preliminary support for new constructors section
2014-09-01 15:35:50 +01:00
Daniel Kolesa
4785353baf
eolian: APIs to check if an implement references get/set
2014-08-29 15:30:51 +01:00
Daniel Kolesa
b05f738675
eolian: APIs to check for @empty/@auto on implements
2014-08-29 15:22:14 +01:00
Daniel Kolesa
42446e1461
eolian: remove the silly appending of .get/.set in implements
2014-08-29 15:06:48 +01:00
Daniel Kolesa
9f232da400
eolian: parsing for @auto and @empty
2014-08-29 14:33:56 +01:00
Daniel Kolesa
616b58dd39
eolian: prepare for more tags in implements
2014-08-29 14:14:21 +01:00
Daniel Kolesa
84a6b654f6
eolian: shouldn't have gotten in
2014-08-29 11:41:19 +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
6c7e5b0a86
eolian: require both set and get to be specified when whole property is in impls
2014-08-29 10:18:26 +01:00
Daniel Kolesa
b69b90832f
eolian: remove constructors section cruft
2014-08-27 15:43:47 +01:00
Carsten Haitzler
875bf96d19
eolian - fix parser with missing break in hanling open bracket
...
fixes CID 1232732
2014-08-27 11:32:17 +09:00
Daniel Kolesa
1bf49ea8e7
eolian: no need to expose _deplist_free
2014-08-26 15:12:09 +01:00
Daniel Kolesa
49e5d4ffb9
eolian: flatten dependencies of a file before parsing them (remove cycles)
2014-08-26 11:06:54 +01:00
Cedric BAIL
2889a6f4c5
eolian: if the if was not taken random value would end up in exp.
2014-08-25 15:25:58 +02:00
Daniel Kolesa
230758a858
eolian: do not free insides of field_list
...
After field_list was migrated from stringshare to struct,
I forgot to change this.
2014-08-24 14:22:42 +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
19d8209266
eolian: clean up type generation + fix function pointers
2014-08-22 14:04:22 +01:00
Daniel Kolesa
4fa161fffa
eolian: yet another validator fix (expression validation)
2014-08-22 13:54:24 +01:00
Daniel Kolesa
189bc4512d
eolian: fix type generation for function pointers
2014-08-22 13:45:20 +01:00
Daniel Kolesa
8b6eadcb3c
eolian: fix segfault in validator + fill in line info properly
2014-08-22 13:28:29 +01:00
Daniel Kolesa
8f7d325b30
eolian: mark function types as function types
2014-08-22 13:18:17 +01:00
Daniel Kolesa
26e1ec3e32
eolian: fully working database validation
2014-08-22 13:10:29 +01:00
Daniel Kolesa
d043c84492
eolian: more validation code (alias/struct/enum/constant/global)
2014-08-22 11:17:31 +01:00
Jérémy Zurcher
68020daf19
Eolian: fix typo
2014-08-22 09:20:53 +02:00
Daniel Kolesa
e99f7876a6
eolian: some initial validation traversal
2014-08-21 16:53:41 +01:00
Daniel Kolesa
cdd4860520
eolian: turn db validation into separate API
2014-08-21 16:35:59 +01:00
Daniel Kolesa
c1afa1b6b5
eolian: add entry point for database validation stage
2014-08-21 16:23:37 +01:00
Daniel Kolesa
fce1e61ff5
eolian: fix shadow warnings
2014-08-21 09:26:06 +01:00
Daniel Kolesa
4103f3daaf
eolian: NULL the hashes after shutdown
2014-08-21 09:26:05 +01:00
Daniel Kolesa
58a2025c25
eolian: new API: eolian_function_is_constructing
2014-08-21 09:26:05 +01:00
Daniel Kolesa
7372ac3ffb
eolian: prevent potential on-error memory leaks
2014-08-21 09:26:05 +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
d788986fd8
eolian: reduce code duplication
2014-08-21 09:26:05 +01:00