Skip to content

atrn0/go-monkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-monkey

Go言語で作るインタプリタ

Getting Started

$ go run main.go
Hello atrn0!! This is Monkey REPL!
>> 3 + 4
7
>> 78 - 39 == 78 / 2
true
>> 888 == 39
false
>> (true == false) != (4 < 100)
true
>> (120 + 433) * 320
176960
>> if (1 > 2) { 1 + 2 } else { 1 - 2 }
-1
>> let add = fn(x, y) { x + y }
>> let sub = fn(x, y) { x - y }
>> let apply = fn(x, y, func) { func(x, y) }
>> apply(3, 4, add)
7
>> apply(10, 5, sub)
5

Test

go test ./...

About

Go言語で作るインタプリタ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages