Hacky kwarg implementation
This commit is contained in:
parent
26c89b77db
commit
e5cebad467
4
Makefile
4
Makefile
@ -36,8 +36,8 @@ libnext.so: metamethods/cord.o util.o SipHash/halfsiphash.o
|
|||||||
SipHash/halfsiphash.c:
|
SipHash/halfsiphash.c:
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
|
||||||
tags: $(wildcard **/*.[ch])
|
tags:
|
||||||
ctags **/*.[ch]
|
ctags *.[ch] **/*.[ch]
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f nextlang *.o
|
rm -f nextlang *.o
|
||||||
|
@ -215,6 +215,10 @@ CORD compile(ast_t *ast)
|
|||||||
return CORD_cat_char(code, ')');
|
return CORD_cat_char(code, ')');
|
||||||
}
|
}
|
||||||
// Lambda,
|
// Lambda,
|
||||||
|
case KeywordArg: {
|
||||||
|
auto kwarg = Match(ast, KeywordArg);
|
||||||
|
return CORD_asprintf(".%s=%r", kwarg->name, compile(kwarg->arg));
|
||||||
|
}
|
||||||
// KeywordArg,
|
// KeywordArg,
|
||||||
case If: {
|
case If: {
|
||||||
auto if_ = Match(ast, If);
|
auto if_ = Match(ast, If);
|
||||||
|
Loading…
Reference in New Issue
Block a user