Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marianozunino/monkey-lang
Implementation of the monkey lang interpreter using TS
https://github.com/marianozunino/monkey-lang
Last synced: about 6 hours ago
JSON representation
Implementation of the monkey lang interpreter using TS
- Host: GitHub
- URL: https://github.com/marianozunino/monkey-lang
- Owner: marianozunino
- Created: 2023-05-31T17:34:44.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-08T18:30:32.000Z (10 months ago)
- Last Synced: 2024-06-20T20:47:53.569Z (7 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Monkey Lang
Monkey is a programming language based on the book [Writing an Interpreter in Go](https://interpreterbook.com/) by Thorsten Ball.
## Features
- C-like syntax
- variable binding
- integers and booleans
- arithmetic expressions
- built-in functions
- first-class functions and higher-order functions
- closures
- data structures
- string
- array
- hash## Lexer
A lexer is a parser that breaks the input into tokens. Tokens are then passed to the parser.
For example:
```c
let x = 5 + 10;
```becomes
```c
[
LET,
IDENTIFIER("x"),
EQUAL,
NUMBER(5),
PLUS,
NUMBER(10),
SEMICOLON
]