/rogue-lang

Compiler for Rogue programming language

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

rogue-lang Build Status

Compiler of my programming language: Rogue

Implementation details:

How to build and run

Use stack build tool in this directory:

stack build
stack exec roguec -- --file <file name> [--verbose]

Features

  • errors handling
    • monadic parser and lexer support for errors reporting
    • typechecker
    • semantic rules
  • global variables
  • power operator
  • make scanf return value, not write in variable (stdlib)
  • type inference
  • lazy logical operations
  • immutable variables (and passing to function by reference) support
  • HOF
  • pattern matching syntax sugar
  • default arguments
  • custom start function

Known bugs:

  • make printf and scanf work for booleans
  • not allowed linebreaks in expressions

Compiler package structure

TODO: describe sources