mirror of
https://github.com/samsonjs/lake.git
synced 2026-04-27 14:57:43 +00:00
change indentation to 2 spaces
This commit is contained in:
parent
5a368fbc47
commit
5c615013da
14 changed files with 1068 additions and 1068 deletions
|
|
@ -117,11 +117,11 @@ static LakeVal *_not(LakeCtx *ctx, LakeList *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ENSURE_INT(x, i) do { \
|
#define ENSURE_INT(x, i) do { \
|
||||||
if (!lk_is_type(TYPE_INT, x)) { \
|
if (!lk_is_type(TYPE_INT, x)) { \
|
||||||
ERR("argument %zu is not an integer: %s", i, lake_repr(x)); \
|
ERR("argument %zu is not an integer: %s", i, lake_repr(x)); \
|
||||||
return NULL; \
|
return NULL; \
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
static LakeVal *_add(LakeCtx *ctx, LakeList *args)
|
static LakeVal *_add(LakeCtx *ctx, LakeList *args)
|
||||||
{
|
{
|
||||||
|
|
@ -298,10 +298,10 @@ static LakeVal *_display(LakeCtx *ctx, LakeList *args)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEFINE_PREDICATE(name, type) \
|
#define DEFINE_PREDICATE(name, type) \
|
||||||
static LakeVal *_## name ##P(LakeCtx *ctx, LakeList *args) \
|
static LakeVal *_## name ##P(LakeCtx *ctx, LakeList *args) \
|
||||||
{ \
|
{ \
|
||||||
return VAL(lk_bool_from_int(ctx, lk_is_type(type, LIST_VAL(args, 0)))); \
|
return VAL(lk_bool_from_int(ctx, lk_is_type(type, LIST_VAL(args, 0)))); \
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_PREDICATE(symbol, TYPE_SYM)
|
DEFINE_PREDICATE(symbol, TYPE_SYM)
|
||||||
DEFINE_PREDICATE(list, TYPE_LIST)
|
DEFINE_PREDICATE(list, TYPE_LIST)
|
||||||
|
|
@ -317,7 +317,7 @@ DEFINE_PREDICATE(primitive, TYPE_PRIM)
|
||||||
|
|
||||||
void bind_primitives(LakeCtx *ctx)
|
void bind_primitives(LakeCtx *ctx)
|
||||||
{
|
{
|
||||||
#define DEFINE(name, fn, arity) env_define(ctx->toplevel, \
|
#define DEFINE(name, fn, arity) env_define(ctx->toplevel, \
|
||||||
sym_intern(ctx, name), \
|
sym_intern(ctx, name), \
|
||||||
VAL(prim_make(name, arity, fn)))
|
VAL(prim_make(name, arity, fn)))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue