Go-based script interpreter, mainly used for learning purposes
It supports arithmetic expressions, variable bindings, functions and their applications, conditional statements, return statements, and even advanced concepts such as higher-order functions and closures. It also supports different data types: integers, Booleans, strings, arrays, and hash tables.
- C-like syntax
- Variable binding
- Integer and Boolean
- Arithmetic expressions
- Built-in functions
- First-class and higher-order functions
- Closures
- String data structures
- Array data structures
- hash data structures
go run main.go
This project was inspired and guided by the book 《用Go语言自制解释器》 by Thorsten Ball. This book explains in detail how to write a script interpreter in Go, which helped me a lot in implementing this project. Thank you to 人民邮电出版社 for publishing this valuable book.