Add lambda and static objects (#30)

* add some more tests for let

* support static strings

* add function calling

* add prints for windows debgu

* one test only

* try swapping r14 and r15 in windows

* swap back

* disable defun for now

* fix massive bug

* fix formatting
This commit is contained in:
water111
2020-09-12 13:11:42 -04:00
committed by GitHub
parent de5aa7e5e4
commit d56540f8c0
50 changed files with 1139 additions and 93 deletions
+17 -1
View File
@@ -121,7 +121,7 @@ Val* Compiler::compile_listen_to_target(const goos::Object& form,
Env* env) {
(void)env;
std::string ip = "127.0.0.1";
int port = 8112;
int port = 8112; // todo, get from some constant somewhere
bool got_port = false, got_ip = false;
for_each_in_list(rest, [&](const goos::Object& o) {
@@ -166,4 +166,20 @@ Val* Compiler::compile_poke(const goos::Object& form, const goos::Object& rest,
va_check(form, args, {}, {});
m_listener.send_poke();
return get_none();
}
Val* Compiler::compile_gs(const goos::Object& form, const goos::Object& rest, Env* env) {
(void)env;
auto args = get_va(form, rest);
va_check(form, args, {}, {});
m_goos.execute_repl();
return get_none();
}
Val* Compiler::compile_set_config(const goos::Object& form, const goos::Object& rest, Env* env) {
(void)env;
auto args = get_va(form, rest);
va_check(form, args, {goos::ObjectType::SYMBOL, {}}, {});
m_settings.set(symbol_string(args.unnamed.at(0)), args.unnamed.at(1));
return get_none();
}