isaiahr / ire-legacy

the ire programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ire

This repository contains the source code for irec, the ire compiler.

What is implemented so far (as of 0.3.0)

  • functions
  • variables
  • type system: native types (Int, Byte, Boolean), arrays, product types, sum types (tagged unions)
  • pattern matching on unions via the pattern match operator (:)
  • imports (very basic)
  • arithmetic
  • conditional branching (if, elseif, else)
  • logical operators (and, or)

What will be implemented in the future

  • rewrite of import system
  • standard library
  • gc
  • first class functions, lambdas, closures
  • other os support (mac, windows)

Usage and options

usage: irec [options] file

irec -h for options. by default "irec file.ire" is equivalent to "irec file.ire -bllvm -O0 -o file"

Examples

See the tests directory. the tests can be run by typing "make test"

note that irec is not very stable right now, and can sometimes crash on bad input.

About

the ire programming language

License:GNU Lesser General Public License v3.0


Languages

Language:C 95.6%Language:Haskell 1.9%Language:Shell 0.9%Language:C++ 0.5%Language:LLVM 0.5%Language:Makefile 0.4%Language:Assembly 0.2%