Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/razshare/olang
- Owner: razshare
- License: mit
- Created: 2023-06-06T22:31:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-25T18:29:37.000Z (over 1 year ago)
- Last Synced: 2024-05-28T13:28:30.411Z (7 months 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.writefor(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]))
}
```