Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/razshare/olang

Olang spec and implementation
https://github.com/razshare/olang

Last synced: about 1 month ago
JSON representation

Olang spec and implementation

Awesome Lists containing this project

README

        

# Olang

A WAT frontend written in Zig (inspired by Zig).

See [./olang.spec](./olang.spec) for the syntax specification.

A showcase of the syntax:

```zig
const User = struct {
email:[]u8,
created:u32,
updated:u32,
};

fn print() !void {
const stdout = @import("std").out
const write = stdout.stream.write

for(value) |byte| {
try write(byte)
}
};

fn log(value:[]u8) !void {
const result:[] = _
try @print(result)
}

pub fn main(args:[]u8) !void {

// this is a comment
const user = User {

};
try log(@string("hello {}", [user.email]))
}
```