Skip to content

A simple low-level statically-typed language like C. Parser & type-checker implemented, probably will compile it to WebAssembly.

Notifications You must be signed in to change notification settings

angusholder/c_like_language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Currently only supports two types: i32, and bool.

Example source:

func println(a: i32) {}

func printlnBool(a: bool) {}

func main() -> i32 {
    let a: i32 = 1;
    let b: i32 = 2;
    let c: i32 = a + b;
    println(c);
    printlnBool(a+b == c);
    printlnBool(true);
    printlnBool(false);
    return 5;
}

func ifExpression() -> i32 {
    return if (1 == 3) {
        1;
    } else if (1 == 2) {
        2;
    } else {
        3;
    };
}

Features

  • kebab-case identifiers
  • Question mark suffixes on identifiers, like empty?, or more-chars?

Useful resources:

About

A simple low-level statically-typed language like C. Parser & type-checker implemented, probably will compile it to WebAssembly.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published