Commit Graph

241 Commits

Author SHA1 Message Date
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 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 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
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 bcff50fb72 eolian: initialize property type correctly 2014-09-16 17:12:52 +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 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 44cecb6a87 eolian: simplify more fill code 2014-09-11 11:48:46 +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 e67b52c514 eolian: fix auto/empty parsing/fill and add tests 2014-09-04 11:07:00 +01:00
Daniel Zaoui 12b0550301 Eolian/Parser: fix wrong type allocation.
fix CID 1234600
2014-09-03 11:28:05 +03: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 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 3e5da03f7d eolian: update virtual to the new syntax (as per wiki) 2014-08-29 11:40:29 +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 49e5d4ffb9 eolian: flatten dependencies of a file before parsing them (remove cycles) 2014-08-26 11:06:54 +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 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
Jérémy Zurcher 68020daf19 Eolian: fix typo 2014-08-22 09:20:53 +02:00
Daniel Kolesa fce1e61ff5 eolian: fix shadow warnings 2014-08-21 09:26:06 +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 33c39282b1 eolian: support "eo: null;" for legacy only functions/properties 2014-08-21 09:26:05 +01:00
Daniel Kolesa 60f0450bac eolian: prevent potential memory leakage on error 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 ffbf149da1 eolian: new API: eolian_class_event_scope_get 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 d2205e58f8 eolian: order fields in structs and enums properly
I don't know what I was thinking, struct and enum fields need to be ordered
so now we keep a separate list around containing the field names in correct order.
2014-08-21 09:26:04 +01:00
Daniel Kolesa e2fb43b7b5 eolian: enum API implementation
This implements the previously declared APIs to manipulate enum types. Also,
it implements the appropriate lookups in expression evaluation so that you
can refer to constants and enums inside constant expressions.
2014-08-21 09:26:04 +01:00
Daniel Kolesa 75ee3b031d eolian: allow namespaces when referring to constants in exprs 2014-08-21 09:26:04 +01:00
Daniel Kolesa be68f9e1fa eolian: initial parsing code and API declarations 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 65332eb3ca eolian: var parsing (global and constant)
This makes the API effectively functional. Also, I added new API
eolian_variable_is_extern to match structs and typedefs.
2014-08-21 09:26:04 +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 a57c729b10 eolian: consume private/protected modifier on events 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
Tom Hacohen a0c419aa4a Eolian parser: Allow tagging properties with @constructor.
Thanks to Quaker for the exact directions.
2014-08-21 09:26:03 +01:00
Daniel Kolesa d3aedb5506 eolian: consume the comment token in properties
This is to add syntax for later combined get/set property docs functionality.
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 788386c86c eolian: eolian_type_name_get now returns the eo name, not c name
so instead of "unsigned int" you get "uint". This is important for handling of
expressions and cross-language interoperability. You can use c_type_get on the
base type to get the C name. Also, append the appropriate suffix to number literals
when calling eolian_expression_value_to_literal.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 8c1b9ed3e2 eolian: initial API for expression evaluation
This commit also does several side (related) changes. Particularly, it updates
the Eolian C generator to use the new API, it adds missing expr types (null, char)
and masks, updates the API dealing with default return values to use expressions
instead of strings and does several fixes (mainly in lexer) around the place.
It also disallows single quoted strings as those are reserved for characters.
2014-08-21 09:26:03 +01:00
Daniel Kolesa d7ca6dc1c3 eolian: initial support for expression evaluation
There are now functions that let you evaluate Eolian_Expression. They're not exposed
yet. Further improvements will come as well as public API.
2014-08-21 09:26:03 +01:00
Daniel Kolesa 96f360a7d1 eolian: lexing of multichar binary operators 2014-08-21 09:26:03 +01:00
Daniel Kolesa 62541ce484 eolian: rename public enum members to a namespaced form 2014-08-21 09:26:03 +01:00
Daniel Kolesa 436a37f0b9 eolian: initial support for expression parsing 2014-08-21 09:26:03 +01:00
Daniel Kolesa e3192796b6 eolian: actually fill in the line/column info in the handles 2014-08-21 09:26:03 +01:00
Daniel Kolesa 8d74261a30 eolian: fix a bug that caused wrong comparisons of class and file name
This also renames ecore_poll files to ecore_poller so that the class name matches.
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
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 5a603c00b6 eolian: remove irrelevant comments
This functionality was already done previously.
2014-07-29 10:05:06 +01:00
Daniel Kolesa ae1ff34dd6 eolian: fix type parsing
I reorganized what's allowed and what is not a bit, particularly, strictened the
rules for named structs and loosened the rules for anonymous structs, and refined
them for void types. It should be all correct now.
2014-07-25 14:51:13 +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 Kolesa 94404b403c eolian: parser support for constructor qualifier
This will be needed when the constructors {} section goes away.
2014-07-24 13:01:47 +01:00
Daniel Kolesa 214cfac378 eolian: protected ctors 2014-07-24 12:58:29 +01:00
Daniel Kolesa a5ad792780 eolian: add support for class functions 2014-07-24 12:05:12 +01:00
Daniel Kolesa a3182948ad eolian: use libgen.h basename 2014-07-23 19:37:03 +01:00
Daniel Kolesa 315d5de11d eolian: use just filename (not path) for eolian_class_get_by_file 2014-07-23 17:15:00 +01:00
Daniel Kolesa a8c0504ce2 eolian: add comment parsing for typedefs 2014-07-23 10:57:23 +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 4f1f182a89 eolian: lexer line context push/pop/restore/clear 2014-07-22 15:44:23 +01:00
Daniel Kolesa cbd54f4de0 eolian: include file info in redef errors when different file 2014-07-22 15:01:09 +01:00
Daniel Kolesa f487d44011 eolian: structs and aliases now contain line/column info for better error messages 2014-07-22 14:48:08 +01:00
Daniel Kolesa 71ae2f2c2e eolian: another leak fix 2014-07-22 10:22:21 +01:00
Daniel Kolesa c03a0a2a39 eolian: memory leak fix 2014-07-22 10:15:56 +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