Skip to content

umairsd/swift-monkey-interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Swift-Monkey-Interpreter

This repo is the Swift implementation of the interpreter for the Monkey language. This interpreter is described in the book, Writing an Interpreter in Go by Thorsten Ball (@mrnugget on GitHub).

Running the Project

Xcode

Download this project. In Xcode, go to File -> Open, and open the root level directory for this repo. The entire project should open up in Xcode.

Command Line

Download this project. From the root directory, run the following set of commands:

# Start up the monkey REPL
$ swift run

# Run all the unit tests.
$ swift test

# Run individual test suites.
$ swift test --filter LexerTests
$ swift test --filter ObjectTests
$ swift test --filter ParserTests
$ swift test --filter ASTTests
$ swift test --filter EvaluatorTests

Building a binary

To build the release version of the binary, run the command:

$ swift build -c release

This builds and creates an executable named monkey in the MonkeyInterpreter/.build/release folder.

About

Swift implementation of the Monkey Language Interpreter.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages