Commit Graph

150 Commits

Author SHA1 Message Date
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 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 7cf7cba88e eolian: remove the c_type_named_get APIs
These have inconsistent behavior and are generally unnecessary, so I'm
removing them. Use the c_type_get funcs instead.
2016-06-06 15:50:15 +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 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 8df2686d90 eolian: lift restriction on namespace/class name conflicts in library
This will allow us to name classes the same as namespaces.
2016-05-06 12:57:01 +01:00
Cedric BAIL 842a020e1f eolian: add support for restartable event. 2016-04-20 15:53:16 -07:00
Daniel Kolesa e061d49aac eolian: completely clean up the type system 2016-03-03 18:58:11 +00:00
Daniel Kolesa 1f58ccb49f eolian: clean up some temporary hashes 2016-03-03 18:58:11 +00:00
Daniel Kolesa c3a33653f3 eolian: separate type_to_str for decls 2016-03-03 18:58:11 +00:00
Daniel Kolesa 5401c775ec eolian: remove database_type_print (unused) 2016-03-03 18:58:11 +00:00
Daniel Kolesa 8514c1846f eolian: add api to deal with typedecl free funcs 2016-03-03 18:58:11 +00:00
Daniel Kolesa c0287a2752 eolian: add some missing typedecl APIs 2016-03-03 18:58:11 +00:00
Daniel Kolesa cf9dbaa7da eolian: add matching APIs to get typedecls by file 2016-03-03 18:58:11 +00:00
Daniel Kolesa 2be79061fd eolian: remove unneeded hashes 2016-03-03 18:58:11 +00:00
Daniel Kolesa 1425523bd4 eolian: actually generate typedecls as necessary 2016-03-03 18:58:11 +00:00
Daniel Kolesa 8944cc44c1 eolian: add typedecl delete func and init hashes correctly 2016-03-03 18:58:11 +00:00
Daniel Kolesa 67f17f1068 eolian: rename typedef to typedecl to clear name confusion 2016-03-03 18:58:11 +00:00
Daniel Kolesa 87c763ac8b eolian: add a structure + hashes representing type decls 2016-03-03 18:58:11 +00:00
Daniel Kolesa 30bc1d285b eolian: allow silencing of type errors in validation
This allows generators to silence type errors in validation in order
to reduce duplicate error messages when generating multiple files.
Also adjusted the C generator to only emit type errors when generating
Eo header files.

@feature
2016-02-10 16:05:07 +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
Stefan Schmidt 1d34318938 eolian: use void to force empty function parameters
We have to use void in a function declaration if we want no function
parameters. Using just empty parenthesis means the function takes an
unspecified number of parameters.

We had it correct for most declarations and this series fixes it for
the rest.
2015-11-26 17:25:06 +01:00
Daniel Kolesa c0d82ba900 eolian: preliminary doc dependency detection for external files
This doesn't quite work yet as path sanitization needs to be done for it to
work correctly. For now this code path is disabled and will be enabled once
all paths are correctly sanitized.
2015-09-23 17:17:50 +01:00
Daniel Kolesa 3f1d29f1ec eolian: remove support for old style docs completely 2015-09-03 15:42:01 +01:00
Daniel Kolesa 950322fd12 eolian: remove support for old event doc syntax 2015-06-11 17:14:51 +01:00
Daniel Kolesa cd12f938af eolian: remove support for old doc style on types and vars 2015-06-11 16:52:45 +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 b2c47737b1 eolian: properly fill and free all doc fields 2015-06-03 15:35:20 +01:00
Daniel Kolesa 4bdacafaf1 eolian: start exposing Eolian_Documentation 2015-06-03 15:35:20 +01:00
Daniel Kolesa a4485484f1 eolian: Eolian_Object for docs 2015-06-02 18:27:46 +01:00
Daniel Kolesa 522c021a36 eolian: initial exposed declaration API - not yet very useful
This API allows you to retrieve a list of declarations in the file
(classes, types, vars) in the order they were declared in.

@feature
2015-06-01 14:32:45 +01:00
Daniel Kolesa d559952117 eolian: reuse the parsed eot hash for eo too (simplify code) 2015-05-22 17:14:38 +01:00
Daniel Kolesa 9214fa3db9 eolian: disallow cyclic dependencies between .eo files
Eo files will now fail to compile if a cycle is detected.

This required some temporary changes in existing eo files
(we had 2 cycles) for which I added a FIXME (they do not
affect C generation).

@feature
2015-05-22 15:03:38 +01:00
Daniel Kolesa 68b8d63e42 eolian: remove unnecessary function 2015-05-21 16:37:30 +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 dfbb777bf1 eolian: keep track of all currently parsing files 2015-05-20 15:41:07 +01:00
Daniel Kolesa 72dcd2da03 eolian: add a functional "import" statement 2015-05-19 15:26:53 +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 d2365e6267 eolian: allow forced retrieval of enum field values 2015-05-13 17:57:03 +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 c8b0b06971 eolian: parsing for beta events 2015-05-08 14:22:32 +01:00
Daniel Kolesa b33e2b21a1 eolian: parse the @beta qualifier 2015-05-08 14:00:07 +01:00
Daniel Kolesa 5b8f3a083b eolian: write the new parameters into the database 2015-02-12 11:32:34 +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 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 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 8631212e45 eolian: remove the need to pass prefix to eolian_function_full_c_name_get 2014-09-25 15:37:18 +01:00