An interpreter written in Go as described in Writing An Interpreter In Go. The book is great and I highly recommend it.
It's called Zip because there's no practical purpose to this language other than as a learning exercise in both Go and learning how interpreters work.
- Builtin Data Types
- Integer
- Float
- String
- Boolean
- Character
- Array
- Hash
- Flow Control
- If-Else
- While
- Variables (Scoped to their block)
- First-class Functions
- With/without Arguments
- Closures
- IO
- Put
- Putln
- Install Go
sudo apt-get install golang-go
- Clone this repo
- Install dependencies
make install
- Run the set up script
./env_setup.sh
- Install direnv
sudo apt-get install direnv
- Edit your
.bashrc
and addeval "$(direnv hook bash)"
to the end - Activate in root directory of this repo
direnv allow
make test
make run
Float literalsCharacter literalsVariable assignmentAssignment shortcut operatorsPrefix Increment and Decrement operatorsPostfix Increment and Decrement operatorsRemainder operatorPower operatorAND and OR operatorsLess Than or Equal and Greater Than or Equal operators- Escape characters
String comparisonString multiplication operatorConcatenate basic data types to strings- String interpolation
- String index expressions
- Append to hash structure
- Set array value at index
- Set hash value at key
- Ternary statements
- Single and multi-line comments
- Else-If statements
- Switch statements
While loops- Until loop
- For loops
- Foreach loops
- Do-While loops
- Break and continue statements
- List comprehensions
- Package import
- Global constant variables
- Emojis
- Extend test coverage for builtins
- Extend tests to check for more types
Read input from a file- Add more builtin functions
- Array and String includes function
- Array all, any, etc type operators
- Add a wiki with language documentation
- Convert tests to use an assertion library