Skip to content

Releases: iwillspeak/ullage

Ullage `0.1.0`

11 May 09:52
Compare
Choose a tag to compare
Ullage `0.1.0` Pre-release
Pre-release

In this fist version of Ullage we will keep things nice and simple. The language just needs a few simple types and bits of built-in functionality to get us off the ground. It's not intended that all of these things will be part of the final language, but right now each brings its own value to the table.

Types

We're going to start with just three types:

  • Bool along with the two laterals true and false
  • Number a double precision floating point number, along with the decimal and floating point literals
  • String along with '-quoted raw literals.

These should be enough to express a wide variety of programs and allow us to explore the language.

Control Flow

When it comes the the actual language itself we will stick to a few basic constructs. These should allow us to begin defining the semantics of be language as well as allowing enough expressibility and flexibility for future development.

  • Control Flow: we'll start off with just if/else for conditions and while for looping.
  • Function, or fn to its friends. This allows us to group code so we can call it later.

Printing

A simple addition to the early language, and not intended to stay the course. print should allow us to develop an array of functional test cases quickly before getting the whole language runtime up on its feet.

Variables

To begin with we just need two kinds of variables: var and let. Both will take a type annotation and an expression of that type. The difference between the two is just mutability. Neither should allow you to define an uninitialised variable at this stage.

Compilation

The language itself will be compiled with LLVM. The output should be something which is independently runnable. For initial versions the compiler can just produce LLVM IR. A small language runtime will be needed to support the print statement and manage calling the entry point. This runtime support can initially be a small Rust stub with a c api. In the future it would be nice to have an interactive REPL.