forked from enlightenment/efl
eolian: Allow promises to have a second type
Promises can have a second type, which is the progress type
This commit is contained in:
parent
e3c8b280c6
commit
b613d6f1d9
|
@ -799,6 +799,12 @@ parse_type_void(Eo_Lexer *ls)
|
||||||
parse_type(ls));
|
parse_type(ls));
|
||||||
pop_type(ls);
|
pop_type(ls);
|
||||||
}
|
}
|
||||||
|
else if(tpid == KW_promise && test_next(ls, ','))
|
||||||
|
{
|
||||||
|
def->subtypes = eina_list_append(def->subtypes,
|
||||||
|
parse_type(ls));
|
||||||
|
pop_type(ls);
|
||||||
|
}
|
||||||
check_match(ls, '>', '<', bline, bcol);
|
check_match(ls, '>', '<', bline, bcol);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,11 @@
|
||||||
struct Generated_Promise_Data {};
|
struct Generated_Promise_Data {};
|
||||||
typedef struct Generated_Promise_Data Generated_Promise_Data;
|
typedef struct Generated_Promise_Data Generated_Promise_Data;
|
||||||
|
|
||||||
|
static void _generated_promise_method_progress_type(Eo *obj EINA_UNUSED, Generated_Promise_Data *pd EINA_UNUSED,
|
||||||
|
Eina_Promise_Owner *promise1 EINA_UNUSED)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Promise * _generated_promise_prop1_get(Eo *obj EINA_UNUSED, Generated_Promise_Data *pd EINA_UNUSED)
|
static Eina_Promise * _generated_promise_prop1_get(Eo *obj EINA_UNUSED, Generated_Promise_Data *pd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -6,6 +6,11 @@ class Generated_Promise (Eo.Base)
|
||||||
@inout promise1: promise<int>;
|
@inout promise1: promise<int>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
method_progress_type {
|
||||||
|
params {
|
||||||
|
@inout promise1: promise<int, double>;
|
||||||
|
}
|
||||||
|
}
|
||||||
method_multiple_args_1 {
|
method_multiple_args_1 {
|
||||||
params {
|
params {
|
||||||
@inout promise1: promise<int>;
|
@inout promise1: promise<int>;
|
||||||
|
|
Loading…
Reference in New Issue