Skip to content

terenty-rezman/snake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snake programming language

tiny interpreted programming language with dynamic typing and just enough instuction set to implement a Snake game

run the interpreter

$ cargo run --release

run the game

$ cargo run --release -- snake_src/snake_game.snk

snake code example

// calc fibonacci number

fn fib(n) {
    if n < 1 { 0 } 
    else {
        if n <= 2 { 1 }
        else { fib(n - 1) + fib(n - 2) }
    }
}

n = 20
print("fib(", n, ") = ", fib(n))

heavily powered by wonderfull rust-peg parser

any similarities to python are purely coincidental

About

snake programming language

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages