diff --git a/.gitignore b/.gitignore index 53d5ccb..b4cbd7e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ *.o *.so -nextlang +tomo tags diff --git a/Makefile b/Makefile index 4325c35..ded163d 100644 --- a/Makefile +++ b/Makefile @@ -26,12 +26,12 @@ LDLIBS=-lgc -lgccjit -lcord -lm -lunistring BUILTIN_OBJS=builtins/array.o builtins/bool.o builtins/color.o builtins/nums.o builtins/functions.o builtins/integers.o \ builtins/pointer.o builtins/memory.o builtins/string.o builtins/table.o builtins/types.o -all: libnext.so nextlang +all: libtomo.so tomo -nextlang: nextlang.c SipHash/halfsiphash.o util.o files.o ast.o parse.o environment.o types.o typecheck.o structs.o enums.o compile.o $(BUILTIN_OBJS) +tomo: tomo.c SipHash/halfsiphash.o util.o files.o ast.o parse.o environment.o types.o typecheck.o structs.o enums.o compile.o $(BUILTIN_OBJS) -libnext.so: util.o files.o $(BUILTIN_OBJS) SipHash/halfsiphash.o - $(CC) $^ $(CFLAGS) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LDLIBS) -Wl,-soname,libnext.so -shared -o $@ +libtomo.so: util.o files.o $(BUILTIN_OBJS) SipHash/halfsiphash.o + $(CC) $^ $(CFLAGS) $(EXTRA) $(CWARN) $(G) $(O) $(OSFLAGS) $(LDLIBS) -Wl,-soname,libtomo.so -shared -o $@ SipHash/halfsiphash.c: git submodule update --init --recursive @@ -39,11 +39,11 @@ SipHash/halfsiphash.c: tags: ctags *.[ch] **/*.[ch] -test: nextlang - for f in test/*; do echo -e "\x1b[1;4m$$f\x1b[m"; VERBOSE=0 CC=tcc ./nextlang "$$f" || break; done +test: tomo + for f in test/*; do echo -e "\x1b[1;4m$$f\x1b[m"; VERBOSE=0 CC=tcc ./tomo "$$f" || break; done clean: - rm -f nextlang *.o SipHash/halfsiphash.o builtins/*.o libnext.so + rm -f tomo *.o SipHash/halfsiphash.o builtins/*.o libtomo.so %.1: %.1.md pandoc --lua-filter=.pandoc/bold-code.lua -s $< -t man -o $@ diff --git a/README.md b/README.md new file mode 100644 index 0000000..113cf4d --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Tomo - Tomorrow's Language + +Tomo is a programming language designed to anticipate and influence the +language design decisions of the future. + +``` +say("Hello world!") +``` + +Check out the [test/](test/) folder to see some examples. diff --git a/compile.c b/compile.c index 67b5aa7..b5d2b03 100644 --- a/compile.c +++ b/compile.c @@ -950,7 +950,7 @@ CORD compile_type_info(env_t *env, type_t *t) module_code_t compile_file(ast_t *ast) { env_t *env = new_compilation_unit(); - CORD_appendf(&env->code->imports, "#include \"nextlang.h\"\n"); + CORD_appendf(&env->code->imports, "#include \"tomo.h\"\n"); for (ast_list_t *stmt = Match(ast, Block)->statements; stmt; stmt = stmt->next) { bind_statement(env, stmt->ast); diff --git a/nextlang.c b/tomo.c similarity index 97% rename from nextlang.c rename to tomo.c index 0e52a79..1646f5b 100644 --- a/nextlang.c +++ b/tomo.c @@ -73,7 +73,7 @@ int main(int argc, char *argv[]) if (!cflags) cflags = "-std=c11 -fdollars-in-identifiers -fsanitize=signed-integer-overflow -fno-sanitize-recover"; - const char *ldlibs = "-lgc -lcord -lm -L. -lnext"; + const char *ldlibs = "-lgc -lcord -lm -L. -ltomo"; if (getenv("LDLIBS")) ldlibs = heap_strf("%s %s", ldlibs, getenv("LDLIBS")); diff --git a/nextlang.h b/tomo.h similarity index 100% rename from nextlang.h rename to tomo.h