Skip to content

zlw/monkey-roc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

I got stucked at building Environment object needed for functions and closures. Currently Roc does not support recursive types, which makes it impossible to implement this feature.

I might come back to this in the future when Roc supports recursive types.

Monkey Language but in Roc 🐵

Installation

First you need to install Roc, check either:

asdf plugin add roc https://github.com/dkuku/asdf-roc.git
asdf install roc nightly

Then you can clone this repository and run the following commands:

git clone git@github.com:zlw/marmoset.git

Build

Dev

faster compilation, slower runtime performance

make build

Release

slower compilation, faster runtime performance

make release

Run tests

make unit

Progress

  • Lexer
  • Parser
  • Evaluator
  • Compiler

Features

Feature Interpreter Compiler
Bindings
Conditionals
Strings
Integers
Arithmetic +-/*
Arrays
Indexing
Dictionaries
Functions
First class functions
Higher order functions
Closures
Recursion
Built-In Functions
Loops
Floats
Macros

TODO

  • Propagate Paring errors instead of crashing
    • Return Result
      • parseIdentifier
      • parseIntegerLiteral
      • parsePrefixExpression
      • parseInfixExpression
      • parseBoolean
      • parseGroupedExpression
      • parseIfExpression
      • parseBlockStatement
      • parseFunctionLiteral
      • parseFunctionParameters
      • parseCallExpression
      • parseCallArguments

About

Monkey Language but in Roc

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors