Skip to content

Instantly share code, notes, and snippets.

@fengb
Created January 24, 2020 21:34
Show Gist options
  • Save fengb/a0dc85c9b2fe1604a8cccd96936f48dc to your computer and use it in GitHub Desktop.
Save fengb/a0dc85c9b2fe1604a8cccd96936f48dc to your computer and use it in GitHub Desktop.
break :blk @intCast(
u8,
@enumToInt(if (std.mem.eql(u8, next.keyword, "void"))
foo
else if (std.mem.eql(u8, next.keyword, "i32"))
foo
else if (std.mem.eql(u8, next.keyword, "i64"))
foo
else if (std.mem.eql(u8, next.keyword, "f32"))
foo
else if (std.mem.eql(u8, next.keyword, "f64"))
foo
else
return error.ParseError),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment