~yerinalexey/hare-libui

c45883b1b0a8114096e444ca074985d5e4e3bedf — Drew DeVault 2 years ago 6141bec
Update syntax per match grammar changes

Signed-off-by: Drew DeVault <sir@cmpwn.com>
3 files changed, 3 insertions(+), 3 deletions(-)

M cmd/demo/main.ha
M ui/init.ha
M ui/window.ha
M cmd/demo/main.ha => cmd/demo/main.ha +1 -1
@@ 6,7 6,7 @@ use ui;
export fn main() void = {
	match (ui::init()) {
	case void => void;
	case err: ui::error =>
	case let err: ui::error =>
		defer free(err);
		fmt::fatal("Failed to initialize UI: {}", err);
	};

M ui/init.ha => ui/init.ha +1 -1
@@ 14,7 14,7 @@ export fn init() (void | error) = {
	let opts = init_options { ... };
	match (c_uiInit(&opts)) {
	case null => void;
	case err: *const char =>
	case let err: *const char =>
		return strings::fromc(err);
	};
};

M ui/window.ha => ui/window.ha +1 -1
@@ 26,7 26,7 @@ export fn window_set_title(win: *window, title: const str) void = {
// Gets title of a window.
export fn window_get_title(win: *window) const str = {
	match(c_uiWindowTitle(win)) {
	case t: *const char =>
	case let t: *const char =>
		return strings::fromc(t);
	case null =>
		abort("uiWindowGetTitle() == NULL");