hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit e7c435bdc9d82d03f18a9685ac39cfc93b293edc
parent 59080a436ac6d5f247dce5702a748c4f5082feb8
Author: Ember Sawady <ecs@d2evs.net>
Date:   Sun, 21 May 2023 08:12:00 +0000

cmd/ioctlgen: fix compilation

Signed-off-by: Ember Sawady <ecs@d2evs.net>

Diffstat:
Mcmd/ioctlgen/main.ha | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/cmd/ioctlgen/main.ha b/cmd/ioctlgen/main.ha @@ -53,14 +53,12 @@ export fn main() void = { continue; }; - let groups = match (regex::find(&ioctlre, line)) { - case void => + let groups = regex::find(&ioctlre, line); + defer free(groups); + if (len(groups) == 0) { fmt::println(line)!; continue; - case let cap: []regex::capture => - yield cap; }; - defer free(groups); const dir = switch (groups[1].content) { case "_IO" => @@ -109,7 +107,7 @@ fn parseioctl(store: *types::typestore, d: dir, params: str) ioctl = { const rn = expect(&lex, ltok::LIT_RUNE).1 as rune; expect(&lex, ltok::COMMA); - const num = expect(&lex, ltok::LIT_ICONST).1 as i64; + const num = expect(&lex, ltok::LIT_ICONST).1 as u64; if (d == dir::IO) { return (d, rn, num: u32, null);