Skip to content

asxalex/TTtL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTtL

TTtL stands for "TT the Language", which is an implementation of my own language, just for fun.

how to use

cd src && make

example

Fibonacci:

define fib(n) {
    if (n == 0 || n == 1) {
        1
    } else {
        fib(n-1) + fib(n-2)
    }
}

i = 0
while(i <= 10) {
    printf("%d\n", fib(i))
    i = i + 1
}

now TT supports "require"

// in helper.tt
define add_3(a) {
    a+3
}

// in main.tt
require("helper.tt")

printf("%d\n", add_3(20))

##TODO supports for list, the environment can also be replaced by hash table for performance.

About

an interpreter of my own

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published