AzimMuradov / mini-go

Mini Go (Golang) parser and interpreter written in Haskell

Home Page:https://azimmuradov.github.io/mini-go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

An implementation of Go mini-language

Author: Azim Muradov, azim.muradov.dev@gmail.com

License: APACHE LICENSE, VERSION 2.0

Project parts:

  • application
  • library
    • parser and lexer implemented using megaparsec
    • analyzer
      • check for name collision or missing names
      • type checker
      • const expressions converters (w/o const keyword)
    • interpreter

Features:

  • supported types: int, bool, string, multidimensional arrays, functions
  • void support
  • function literals (anonymous functions), closures (including mutable closures) support
  • operators (arithmetic, logic, comparison) support
  • if, else, for support
  • recursion, mutual recursion support
  • function definitions, globals support
  • variable declarations, variable assignments, short variable declarations (:=) support
  • increment, decrement support
  • supported stdlib functions: len, print, println, panic

TODO:

  • add pretty printer
  • add missing docs
  • add unit tests

About

Mini Go (Golang) parser and interpreter written in Haskell

https://azimmuradov.github.io/mini-go

License:Apache License 2.0


Languages

Language:Haskell 91.4%Language:Go 7.4%Language:Shell 1.2%