https://github.com/razshare/olang
Olang spec and implementation
https://github.com/razshare/olang
Last synced: 8 months ago
JSON representation
Olang spec and implementation
- Host: GitHub
- URL: https://github.com/razshare/olang
- Owner: razshare
- License: mit
- Created: 2023-06-06T22:31:38.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-25T18:29:37.000Z (almost 3 years ago)
- Last Synced: 2025-03-01T00:56:13.744Z (over 1 year ago)
- Language: Zig
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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]))
}
```