summaryrefslogtreecommitdiff
path: root/tnslc/tnslc_wrapped.tnsl
blob: e82581a64bb08301761253f5cfc6e2fb3e994c3d (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
:include "c_wrap.tnsl"
:include "logging.tnsl"
:include "vector.tnsl"
:include "utils.tnsl"
:include "tokenizer.tnsl"
:include "compiler.tnsl"

{}uint8 m_usage = "Usage: tnslc [file to compile] [output asm]\n\0"

/; main (int argc, ~~uint8 argv) [int]
    asm "mov r8, rcx"
    asm "mov r9, rdx"

    /; if (argc < 3)
        _printf(~m_usage{0})
        return 1
    ;/

    Path in
    Path out

    in.start(argv{0})
    out.start(argv{0})

    in.relative_file(argv{1})
    out.relative_file(argv{2})

    compile(in, out)

    in._del()
    out._del()

    return 0
;/