Skip to content
Kiwi programming language
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
examples
.gitignore
.travis.yml
Gopkg.lock
Gopkg.toml
LICENSE
README.md
builtins.go
builtins_test.go
datatype.go
datatype_string.go
datatype_test.go
main.go
node.go
parser.go
parser_test.go
printer.go
printer_test.go
runtime.go
runtime_test.go
scanner.go
scanner_test.go
scope.go
scope_test.go
stack.go
stack_test.go
test.sh
token.go
token_string.go
token_test.go
visitor.go

README.md

Kiwi Programming Langauge

Build Status codebeat badge codecov

This is the README file for the Kiwi Programming Language distribution.

Kiwi is my on-going “forever project” to implement a programming language. Not only is it a learning opportunity, it’s also a playground for me to explore issues in language design.

Kiwi probably won’t be useful to anyone other than me, especially at the rate I get to work on it, but my code is available as free software. You can do whatever you want with it under the terms of the license provided in the LICENSE file. Oh... and don’t come after me if it melts down your computer.

Code Examples

Generate the Fibonacci Series

func fibonacci n
{ 
    if n < 2 { 
        return n
    } 
    m := fibonacci(n - 1)
    p := fibonacci(n - 2)
    return m + p
}

i := 0
while i < 10 { 
    i := i + 1
    fib := fibonacci(i)
    write(fib, "\n")
}

Fizz Buzz

i := 0
while i < 100 {
    i := i + 1

    if i % 15 = 0 {
        write("Fizz Buzz\n")
    }
    else i % 3 = 0 {
        write("Fizz\n")
    }
    else i % 5 = 0 {
        write("Buzz\n")
    }
    else {
        write(i, "\n")
    }
}
You can’t perform that action at this time.