gfaff / hacklang

The Hack programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hacklang

The Hack programming language

run

$ dep ensure

Start REPL shell

$ go run cmd/main.go

example

number

-> 1
1

bool

-> true
true
-> false
false

string

-> `hello world`
`hello world`

list

-> [1, 2, 3]
[1, 2, 3]

map

-> {a: 1, b: 2}
{a: 1, b: 2}

function

-> i => { print(i) }
<function>

See example for more examples.

run file

$ go run cmd/main.go example/hello_world.hack

format file

$ go run cmd/main.go --format example/hello_world.hack

About

The Hack programming language

License:MIT License


Languages

Language:Go 93.1%Language:HTML 6.8%Language:Makefile 0.1%