aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-24 16:06:49 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-24 16:06:49 -0500
commitc2228bf9861b38f2514d0cc8a270754bb3a03dd7 (patch)
tree494d52f6e596dd00ff6912c28c4a5dfab5a8423c
parentdbad340c29e5911119db33d6043cc502dbe40ed1 (diff)
Rename 'nextlang'->'tomo'
-rw-r--r--.gitignore2
-rw-r--r--Makefile14
-rw-r--r--README.md10
-rw-r--r--compile.c2
-rw-r--r--tomo.c (renamed from nextlang.c)2
-rw-r--r--tomo.h (renamed from nextlang.h)0
6 files changed, 20 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 53d5ccbc..b4cbd7ec 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
*.o
*.so
-nextlang
+tomo
tags
diff --git a/Makefile b/Makefile
index 4325c358..ded163d8 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 00000000..113cf4db
--- /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 67b5aa78..b5d2b03c 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
index 0e52a790..1646f5bd 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
index 113e5820..113e5820 100644
--- a/nextlang.h
+++ b/tomo.h