Notice: Badger is being completely rewritten.
Badger is an experimental programming language. It can be compiled to multiple languages or can be interpreted by the reference interpreter.
greet(name) {
return "Hello $(name)"
}
let names = ["Kenneth", "Logan", "Sam", "Mike"]
for name in names {
print(greet(name))
}
To install the badger interpreter, run the following command:
pub global activate -sgit git://github.com/badger-lang/badger.git
To run an example, run the following command:
badger example/greeting.badger
To compile to JavaScript, run the following command:
badger --compile=js example/greeting.badger > hello.js