aboutsummaryrefslogtreecommitdiff
path: root/docs/tomo.1.md
blob: 3bf5e7791c70a6d602c52fb5a0565a9a5eee83f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
% TOMO(1)
% Bruce Hill (*bruce@bruce-hill.com*)
% June 11, 2024

# NAME

tomo - The programming language of tomorrow.

# SYNOPSIS

Run a program:
: `tomo` *program.tm* \[\[`--`\] *args...*\]

Transpile tomo files to C files:
: `tomo` `-t` *file1.tm* *file2.tm*...

Compile files to static object files:
: `tomo` `-c` *file1.tm* *file2.tm*...

Compile file to an executable:
: `tomo` `-e` *file1.tm*

Build a shared library:
: `tomo` `-s=`*mylib.1.2.3* *file1.tm* *file2.tm*...

# DESCRIPTION

Tomo is a programming language that is statically typed, compiled, small, and
garbage-collected, with concise syntax and built-in support for
high-performance, low-overhead datastructures. It compiles by first outputting
C code, which is then compiled using a C compiler of your choice.

# OPTIONS

`-h`, `--help`
: Print the usage and exit.

`-t`, `--transpile`
: Transpile the input files to C code without compiling them.

`-c`, `--compile-obj`
: Compile the input files to static objects, rather than running them.

`-e`, `--compile-exe`
: Compile the input file to an executable.

`-L`, `--library`
: Compile the input files to a shared library file and header.

`-I`, `--install`
: Install the compiled executable or library.

`-C` *<program>*, `--show-codegen` *<program>*
: Set a program (e.g. `cat` or `bat`) to display the generated code

`-O` **level**, `--optimization` **level**
: Set the optimization level.

`-v`, `--verbose`
: Print extra verbose output.

`--version`
: Print the compiler version and exit.

`--changelog`
: Print the compiler change log and exit.

`--prefix`
: Print the Tomo installation prefix and exit.

`-r`, `--run`
: Run an installed tomo program from `~/.local/share/tomo_vX.Y/installed`.