diff --git a/src-self-hosted/ir.zig b/src-self-hosted/ir.zig index 28e059e6cdafbccb1c1257b5dbdb568ee2897a47..b8b3cb2dcc5dc1009b2cd480e42c165df4a60f04 100644 --- a/src-self-hosted/ir.zig +++ b/src-self-hosted/ir.zig @@ -237,6 +237,8 @@ fn parseOptionalType(ctx: *ParseContext) !?Type { const type_text = mem.trim(u8, type_text_untrimmed, " \n"); if (mem.eql(u8, type_text, "usize")) { return Type.initTag(.int_usize); + } else if (mem.eql(u8, type_text, "noreturn")) { + return Type.initTag(.no_return); } else { return parseError(ctx, "TODO parse type '{}'", .{type_text}); } diff --git a/src-self-hosted/type.zig b/src-self-hosted/type.zig index d3e561a0d90680c7d7e3fc8af61e2c8b418d4550..d7093a02f64b359c228b9f5c161351b518f74bdf 100644 --- a/src-self-hosted/type.zig +++ b/src-self-hosted/type.zig @@ -75,6 +75,7 @@ pub const Type = extern union { /// See `zigTypeTag` for the function that corresponds to `std.builtin.TypeId`. pub const Tag = enum { // The first section of this enum are tags that require no payload. + no_return, int_comptime, int_u8, int_usize,