The Tomo programming language
Go to file
2024-03-09 23:44:52 -05:00
builtins Removing some dead code 2024-03-09 23:44:52 -05:00
docs Rename Str -> Text 2024-03-03 18:15:45 -05:00
test Add test for secret structs 2024-03-09 19:06:09 -05:00
.gitignore Rename 'nextlang'->'tomo' 2024-02-24 16:06:49 -05:00
ast.c Deprecate secret langs (just use one-member structs) 2024-03-09 19:02:13 -05:00
ast.h Deprecate secret langs (just use one-member structs) 2024-03-09 19:02:13 -05:00
compile.c Minor cleanups to get compilation working on clang 2024-03-09 23:21:44 -05:00
compile.h Change lang stringification to include type name 2024-03-09 18:32:36 -05:00
enums.c Change lang stringification to include type name 2024-03-09 18:32:36 -05:00
enums.h Improve enums with metamethods 2024-02-24 15:24:44 -05:00
environment.c Extra lambda test 2024-03-09 16:08:03 -05:00
environment.h Implement lambdas and closures 2024-03-09 16:03:38 -05:00
files.c Changes to string parsing 2024-02-11 19:30:02 -05:00
files.h Fix up align issues 2024-02-17 22:07:25 -05:00
Makefile Removing some dead code 2024-03-09 23:44:52 -05:00
parse.c Add explicit check for space indentation 2024-03-09 23:16:23 -05:00
parse.h Rename sss_* to just * 2024-02-11 19:06:42 -05:00
README.md Removing some dead code 2024-03-09 23:44:52 -05:00
structs.c Change lang stringification to include type name 2024-03-09 18:32:36 -05:00
structs.h Unused import 2024-03-09 14:47:40 -05:00
tomo.c Add langs to the language 2024-03-09 18:22:12 -05:00
tomo.h Removing some dead code 2024-03-09 23:44:52 -05:00
typecheck.c Deprecate secret langs (just use one-member structs) 2024-03-09 19:02:13 -05:00
typecheck.h Initial pass at namespacing 2024-03-03 13:04:50 -05:00
types.c Add langs to the language 2024-03-09 18:22:12 -05:00
types.h Remove references to libgccjit 2024-03-09 23:23:31 -05:00
util.c Tweak cord formatting 2024-02-17 14:47:14 -05:00
util.h Minor cleanup 2024-02-17 14:54:19 -05:00

Tomo - Tomorrow's Language

Tomo is a programming language designed to anticipate and influence the language design decisions of the future.

func greeting(name:Text)->Text
	greeting := "hello {name}!"
	return greeting:title()

>> greeting("world")
= "Hello World!"

Check out the test/ folder to see some examples.

Dependencies

Tomo has a very small set of dependencies:

  • The Boehm garbage collector for runtime garbage collection.
  • libunistring for unicode string support.
  • a C compiler
  • and libc/libm, which should definitely already be installed.

Both of which should be available on your package manager of choice (for example, pacman -S gc libunistring).

Building

The Tomo compiler can be compiled with either GCC or Clang by running make.

Running

You can run a Tomo program by running ./tomo program.tm. By default, this will use your environment's $CC variable to select which C compiler to use. If no C compiler is specified, it will default to tcc (Tiny C Compiler), which is exceptionally fast.