*developing lambda.
This commit is contained in:
parent
f2b42770bd
commit
ec695b5d5f
@ -417,6 +417,7 @@ typedef enum _invokable_e {
|
||||
#ifdef MB_ENABLE_LAMBDA
|
||||
typedef struct _running_context_ref_t {
|
||||
_ref_t ref;
|
||||
struct _running_context_ref_t* prev;
|
||||
struct _running_context_t* running;
|
||||
} _running_context_ref_t;
|
||||
#endif /* MB_ENABLE_LAMBDA */
|
||||
@ -11455,6 +11456,7 @@ int _core_lambda(mb_interpreter_t* s, void** l) {
|
||||
if(!routine->func.lambda.parameters)
|
||||
routine->func.lambda.parameters = _ls_create();
|
||||
_ls_pushback(routine->func.lambda.parameters, v);
|
||||
/* TODO: Add lambda parameters */
|
||||
|
||||
ast = (_ls_node_t*)*l;
|
||||
if(_IS_FUNC(ast->data, _core_close_bracket))
|
||||
@ -11479,6 +11481,7 @@ int _core_lambda(mb_interpreter_t* s, void** l) {
|
||||
brackets++;
|
||||
else if(_IS_FUNC(ast->data, _core_close_bracket))
|
||||
brackets--;
|
||||
/* TODO: Mark upvalues */
|
||||
ast = ast->next;
|
||||
}
|
||||
*l = ast;
|
||||
|
@ -90,7 +90,7 @@ extern "C" {
|
||||
#endif /* MB_ENABLE_CLASS */
|
||||
|
||||
#ifndef MB_ENABLE_LAMBDA
|
||||
# define MB_ENABLE_LAMBDA
|
||||
# define MB_ENABLE_LAMBDA /* The Lambda is still under development */
|
||||
#endif /* MB_ENABLE_LAMBDA */
|
||||
|
||||
#ifndef MB_COMPACT_MODE
|
||||
|
Loading…
x
Reference in New Issue
Block a user