Skip to content

aakash1104/go-monkey-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monkey Programming Language

🐒 MonkeyLang Interpreter 🐒

Go-Monkey-Go is an interpreter for monkeylang, a simple programming language created by Thorsten Ball written in Go. This is adapted from Ball's book Writing an Interpreter in Go.

Understanding MonkeyLang Syntax

Monkey has a very simple syntax. Monkey supports primitive data types such as integers, strings, booleans. Variable declarations are done like this:

let num = 10;
let b = num + 50;
let str = "Hello";
let flag = true;

Monkey also supports user defined functions:

let sum = fn(a, b) {
    x + y;
};

There's also support for conditional statements:

if (a <= b) {
    return true;
} else {
    return false;
}

Motivation 🤔

After reading this interview of Rob Pike, I was extremely curious about Go and it's advantages in developing and deploying software.

One of the best ways to get exposed to a programming language is to build something from scratch. Compilers and Interpreters are one of the most beautiful pieces of art in Computer Science. So here's my attempt of building an interpreter in Go. My goal is to get thinking about Go and Monkeylang and add other features to this programming language (I need to think more about what I want to add though).

Note: This repository will be constantly updated as I read the book and complete the exercises. Stay tuned! 🤓

About

🐒 MonkeyLang Interpreter in Go (still under development)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages