https://github.com/aakash1104/go-monkey-go
:monkey: MonkeyLang Interpreter in Go (still under development)
https://github.com/aakash1104/go-monkey-go
go golang interpreter monkey monkey-programming-language
Last synced: 29 days ago
JSON representation
:monkey: MonkeyLang Interpreter in Go (still under development)
- Host: GitHub
- URL: https://github.com/aakash1104/go-monkey-go
- Owner: aakash1104
- Created: 2020-08-02T03:59:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-10T01:33:35.000Z (over 5 years ago)
- Last Synced: 2024-06-19T17:56:21.117Z (over 1 year ago)
- Topics: go, golang, interpreter, monkey, monkey-programming-language
- Language: Go
- Homepage:
- Size: 262 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
:monkey: MonkeyLang Interpreter :monkey:
`Go-Monkey-Go` is an interpreter for [monkeylang](https://monkeylang.org/), a
simple programming language created by
[Thorsten Ball](https://thorstenball.com/) written in Go. This is adapted from
Ball's book [Writing an Interpreter in Go](https://interpreterbook.com).
### 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:
```js
let num = 10;
let b = num + 50;
let str = "Hello";
let flag = true;
```
Monkey also supports user defined functions:
```js
let sum = fn(a, b) {
x + y;
};
```
There's also support for conditional statements:
```js
if (a <= b) {
return true;
} else {
return false;
}
```
### Motivation :thinking: ###
After reading this [interview](https://evrone.com/rob-pike-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! :nerd_face: