/friendshipismonadic

Fim++ interpreter in Haskell

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

friendshipismonadic

A FiM++ interpreter written in Haskell, using Parsec as a parser.

Dependencies

This project uses stack, a tool for repeatable, cross-platform builds of haskell projects. You'll need to install stack to build the binaries or run the tests.

Installation

stack install

fim examples/helloworld.fim

Run tests

stack test

Status

What works

  • Boolean, Character, Number, and String literals
  • Assigning to/reading from variables
  • Arithmatic Operators
  • Comparison Operators
  • Boolean Operators
  • Branching Statements
  • While and Do While, and For loops
  • User Input
  • Calling Methods
  • Comments
  • Increment/Decrement
  • String concatenation
  • Creating arrays
  • Reading elements from arrays
  • Writing to arrays
  • Switches

What needs work

  • The error messages are... not good, especially for parsing/lexing

What I'm not going bother with

  • Interfaces (what does this even mean in a language without objects?)
  • Inheritence (Not much point without libraries)
  • More than one class (no syntax for calling other classes or creating objects)