blob: b448aef23d6f8f5eb859bf45c724fc528a75fc8c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
const std = @import("std");
pub fn main() !void {
std.debug.print("Hello, world!\n", .{});
}
pub fn add(a: i32, b: i32) i32 {
return a + b;
}
const Point = struct {
x: f32,
y: f32,
pub fn init(x: f32, y: f32) Point {
return Point{ .x = x, .y = y };
}
};
const Color = enum {
Red,
Green,
Blue,
};
const MyError = error{
BadStuff,
};
|