Skip to content

silloi/monkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monkey

            __,__
   .--.  .-"     "-.  .--.
  / .. \/  .-. .-.  \/ .. \
 | |  '|  /   Y   \  |'  | |
 | \   \  \ 0 | 0 /  /   / |
  \ '- ,\.-"""""""-./, -' /
   ''-' /_   ^ ^   _\ '-''
       |  \._   _./  |
       \   \ '~' /   /
        '._ '-=-' _.'
           '-----'
  • mathematical expressions
  • variable bindings
  • functions
  • application of those functions
  • conditionals
  • return statements
  • higher-order functions
  • closures
  • data types
    • integers
    • booleans
    • strings
    • arrays
    • hashes
  • bytecode compiler
  • virtual machine

Eval

go run main.go

VM

go build -o monkey . && ./monkey

Benchmark

go build -o fibonacci ./benchmark
./fibonacci -engine=eval
./fibonacci -engine=vm

Writing An Interpreter In Go

Go there and buy this now: https://interpreterbook.com/

About

Writing An Interpreter In Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages