tcolar / anko

Scriptable interpreter written in golang

Home Page:http://play-anko.appspot.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anko

Build Status

(Picture licensed under CC BY-SA 3.0 by wikipedia)

Scriptable interpreter written in golang

Usage

# declare function
func foo(x){
  return x + 1
}

# declare variables
x = 1
y = x + 1

# print values 
println(x * (y + 2 * x + foo(x) / 2))

# if/else condition
if foo(y) > 1 {
  println("こんにちわ世界")
} else {
  println("Hello, World")
}

# array type
a = [1,2,3]
println(a[2])
println(len(a))

# map type
m = {"foo": "bar", "bar": "baz"}
for k in keys(m) {
  println(m[k])
}

Requirements

  • golang

Installation

$ go get github.com/mattn/anko

License

MIT

Author

Yasuhiro Matsumoto (a.k.a mattn)

About

Scriptable interpreter written in golang

http://play-anko.appspot.com/


Languages

Language:Go 88.2%Language:Yacc 8.5%Language:Vim Script 3.1%Language:Batchfile 0.2%Language:Shell 0.1%Language:Makefile 0.0%