summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorDaniel Kolesa <daniel@octaforge.org>2019-10-18 08:01:58 -0700
committerwww-data <www-data@enlightenment.org>2019-10-18 08:01:58 -0700
commit2e13a3f5d274aaf03a9a70c807e9e133e4c6e662 (patch)
tree77fc60ca2314b9c9add22cc52129b119f22aec2f /pages
parent77b24c43cd34aa9564efb7d63fe10667567d24c2 (diff)
Wiki page eo.md changed with summary [general fixes] by Daniel Kolesa
Diffstat (limited to 'pages')
-rw-r--r--pages/contrib/docs/eo.md.txt70
1 files changed, 32 insertions, 38 deletions
diff --git a/pages/contrib/docs/eo.md.txt b/pages/contrib/docs/eo.md.txt
index fe1a1b9..6e57d75 100644
--- a/pages/contrib/docs/eo.md.txt
+++ b/pages/contrib/docs/eo.md.txt
@@ -15,9 +15,9 @@ This is the quick reference, for a full definition see [Format in EBNF](#Eolian_
15 * Groups and blocks are defined within ``{`` and ``}`` 15 * Groups and blocks are defined within ``{`` and ``}``
16 * Some modifiers may be used, their meaning and scope are defined per context, such as ``@extern`` may be used with ``type``, ``enum`` and ``struct`` to denote they are already declared elsewhere (like an included header). 16 * Some modifiers may be used, their meaning and scope are defined per context, such as ``@extern`` may be used with ``type``, ``enum`` and ``struct`` to denote they are already declared elsewhere (like an included header).
17 * Optional components are defined with ``[`` and ``]``. 17 * Optional components are defined with ``[`` and ``]``.
18 * Most things (all toplevel declarations, methods, events etc.) let you add `@beta` in their tags section to mark it as beta API.
18 * Basic Definitions: 19 * Basic Definitions:
19 * **Variables**: ``var [@extern] name : type [= value] ;`` 20 * **Constant**: ``const [@extern] name : type = value ;``
20 * **Constant**: ``const name : type = value ;``
21 * **Enumeration**: ``enum [@extern] name { field1, field2 [= value2] ... }`` 21 * **Enumeration**: ``enum [@extern] name { field1, field2 [= value2] ... }``
22 * Structure Definitions: 22 * Structure Definitions:
23 * **Opaque**: ``struct [@extern] name ;`` 23 * **Opaque**: ``struct [@extern] name ;``
@@ -25,41 +25,39 @@ This is the quick reference, for a full definition see [Format in EBNF](#Eolian_
25 * **With fields**: ``struct name { field1 : type1 , field2 : type2 ... } ;`` 25 * **With fields**: ``struct name { field1 : type1 , field2 : type2 ... } ;``
26 * Type Definitions: 26 * Type Definitions:
27 * **Simple**: ``type [@extern] name : other ;`` 27 * **Simple**: ``type [@extern] name : other ;``
28 * **Simple with free function**: ``type @free( free_function ) name : other ;``
29 * **List**: ``type name : list<Child_Type>* ;`` 28 * **List**: ``type name : list<Child_Type>* ;``
30 * **Array**: ``type name : array<Child_Type>* ;`` 29 * **Array**: ``type name : array<Child_Type>* ;``
31 * **Hash**: ``type name : hash<Key_Type , Value_Type>* ;``
32 * Object Definitions: 30 * Object Definitions:
33 * **Common Body** for class, abstract, interface and mixin: 31 * **Common Body** for class, abstract, interface and mixin:
34 - ``legacy_prefix : prefix ;`` 32 - ``c_prefix : prefix ;``
35 - ``eo_prefix: prefix ;``
36 - ``events { event_name_1 [@private | @protected | @beta | @hot] : type1 ; event_name_2 : type2 ; ... }`` 33 - ``events { event_name_1 [@private | @protected | @beta | @hot] : type1 ; event_name_2 : type2 ; ... }``
37 - ``methods { list_of_methods_and_properties }`` 34 - ``methods { list_of_methods_and_properties }``
38 - **Methods**: ``name [@protected | @const | @class | @pure_virtual] { method_body }`` 35 - **Methods**: ``name [@protected | @const | @static | @pure_virtual] { method_body }``
39 * ``legacy: name ;`` 36 * ``return: type [(expression)] [@no_unused];``
40 * ``return: type [(expression)] [@warn_unused];`` 37 * ``params { [@in | @out | @inout] name1 : type1 [(expression)] [@optional] ; name2 : type2 , ... }``
41 * ``params { [@in | @out | @inout] name1 : type1 [(expression)] [@nonull | @nullable | @optional] ; name2 : type2 , ... }`` 38 - **Properties**: ``@property name [@protected | @static | @pure_virtual ] { property_body }``
42 - **Properties**: ``@property name [@protected | @class | @pure_virtual ] { property_body }`` 39 * ``get [@pure_virtual] [{ return: type ; }]``
43 * ``get [@pure_virtual] [{ return: type ; legacy: name }]`` 40 * ``set [@pure_virtual] [{ return: type ; }]``
44 * ``set [@pure_virtual] [{ return: type ; legacy: name }]`` 41 * ``values { name1 : type1 [(expression)] [@optional] ; name2 : type2 , ... }``
45 * ``values { name1 : type1 [(expression)] [@nonull | @nullable | @optional] ; name2 : type2 , ... }`` 42 * ``keys { name1 : type1 [(expression)] [@optional] ; name2 : type2 , ... }``
46 * ``keys { name1 : type1 [(expression)] [@nonull | @nullable | @optional] ; name2 : type2 , ... }`` 43 * **Classes**: ``class name extends Base_Class1 implements Some_Interface composites Another_Interface ) { class_body }``
47 * **Classes**: ``class name ( Base_Class1 , Base_Class2 ) { class_body }``
48 - ``data: private_data_type `` 44 - ``data: private_data_type ``
49 - ``implements { class.constructor; class.destructor; [@auto | @empty] interface_name1 ; .local_name2 , ... }`` 45 - ``implements { class.constructor; class.destructor; [@auto | @empty] interface_name1 ; .local_name2 , ... }``
50 - ``constructors { method_name1 ; .local_method_name2 , ... }`` 46 - ``constructors { method_name1 ; .local_method_name2 , ... }``
51 * **Abstract classes**: ``abstract name ( Base_Class1 , Base_Class2 ) { abstract_body }`` 47 * **Abstract classes**: ``abstract name extends Base_Class1 { abstract_body }``
52 - ``data: private_data_type `` 48 - ``data: private_data_type ``
53 - ``implements { class.constructor; class.destructor; [@auto | @empty] interface_name1 ; .local_name2 , ... }`` 49 - ``implements { class.constructor; class.destructor; [@auto | @empty] interface_name1 ; .local_name2 , ... }``
54 - ``constructors { method_name1 ; .local_method_name2 , ... }`` 50 - ``constructors { method_name1 ; .local_method_name2 , ... }``
55 * **Mixins**: ``mixin name ( Base_Class1 , Base_Class2 ) { mixin_body }`` 51 * **Mixins**: ``mixin name requires Some_Class extends Base_Class1 , Base_Class2 { mixin_body }``
56 - ``data: private_data_type `` 52 - ``data: private_data_type ``
57 - ``implements { class.constructor; class.destructor; [@auto | @empty] interface_name1 ; .local_name2 , ... }`` 53 - ``implements { class.constructor; class.destructor; [@auto | @empty] interface_name1 ; .local_name2 , ... }``
58 * **Interfaces**: ``interface name ( Base_Class1 , Base_Class2 ) { interface_body }`` 54 * **Interfaces**: ``interface name extends Base_Class1 , Base_Class2 { interface_body }``
59 - ``implements { class.constructor; class.destructor; }`` 55 - ``implements { class.constructor; class.destructor; }``
60 56
61## Eolian File Format Example ## 57## Eolian File Format Example ##
62 58
59Warning: This is out of date and does not reflect current Eolian syntax.
60
63Before jumping to read the commented example file you may refer to the [Language Quick Reference](#Language_Quick_Reference) or check the full [Eolian file format](#Eolian_File_Format). 61Before jumping to read the commented example file you may refer to the [Language Quick Reference](#Language_Quick_Reference) or check the full [Eolian file format](#Eolian_File_Format).
64 62
65```c 63```c
@@ -277,23 +275,20 @@ Before jumping to read the commented example file you may refer to the [Language
277 275
278## Type Context Matrix ## 276## Type Context Matrix ##
279 277
280| | Value | Named struct | Enum | Pointer | Void | 278| | Value | Named struct | Enum | Void |
281| --------------- | ------ | ------------ | ------ | ------- | ------ | 279| --------------- | ------ | ------------ | ------ | ------ |
282| typedef | YES | **NO** | **NO** | YES | **NO** | 280| typedef | YES | **NO** | **NO** | **NO** |
283| return | YES | **NO** | **NO** | YES | **NO** | 281| return | YES | **NO** | **NO** | **NO** |
284| getter return | YES | **NO** | **NO** | YES | YES | 282| getter return | YES | **NO** | **NO** | YES |
285| in param | YES | **NO** | **NO** | YES | **NO** | 283| in param | YES | **NO** | **NO** | **NO** |
286| out/inout param | YES | **NO** | **NO** | YES | YES | 284| out/inout param | YES | **NO** | **NO** | **NO** |
287| event | YES | **NO** | **NO** | YES | **NO** | 285| event | YES | **NO** | **NO** | YES |
288| struct field | YES | **NO** | **NO** | YES | **NO** | 286| struct field | YES | **NO** | **NO** | **NO** |
289| function param | YES | **NO** | **NO** | YES | **NO** | 287| function param | YES | **NO** | **NO** | **NO** |
290| subtype | YES | **NO** | **NO** | YES | **NO** | 288| subtype | YES | **NO** | **NO** | **NO** |
291| pointer base | YES | **NO** | **NO** | YES | YES | 289| const modifier | YES | **NO** | **NO** | **NO** |
292| const modifier | YES | **NO** | **NO** | YES | YES* | 290| own modifier | **NO** | **NO** | **NO** | **NO** |
293| own modifier | **NO** | **NO** | **NO** | YES | **NO** | 291| free modifier | **NO** | **NO** | **NO** | **NO** |
294| free modifier | **NO** | **NO** | **NO** | YES | **NO** |
295
296\* Keep in mind that whether const void is allowed or not depends on the outer type. When the const void is a base for a pointer it's allowed, otherwise it is not.
297 292
298## Builtin Types ## 293## Builtin Types ##
299 294
@@ -330,10 +325,9 @@ Before jumping to read the commented example file you may refer to the [Language
330| double | double | | 325| double | double | |
331| bool | Eina_Bool | Eina type, builtin values true and false mapping to EINA_TRUE and EINA_FALSE | 326| bool | Eina_Bool | Eina type, builtin values true and false mapping to EINA_TRUE and EINA_FALSE |
332| void | void | Not applicable in some contexts | 327| void | void | Not applicable in some contexts |
333| void_ptr | void * | |
334| string | const char * | | 328| string | const char * | |
335| stringshare| Eina_Stringshare * | | 329| stringshare| Eina_Stringshare * | |
336| generic_value | Eina_Value * | | 330| any_value | Eina_Value * | |
337 331
338## Eolian File Format ## 332## Eolian File Format ##
339 333