diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd97a9c..52d22e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Zig run: | sudo apt install xz-utils - sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.1911+3bf89f55c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' + sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.2577+271452d22.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' - name: x86_64-linux -> aarch64-macos run: zig build -Dtarget=aarch64-macos # TODO: re-enable this, unsure why it is failing during cross-compilation: @@ -25,10 +25,10 @@ jobs: # - name: Setup Zig # run: | # $ProgressPreference = 'SilentlyContinue' - # Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.1911+3bf89f55c.zip" -OutFile "C:\zig.zip" + # Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.2577+271452d22.zip" -OutFile "C:\zig.zip" # cd C:\ # 7z x zig.zip - # Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.1911+3bf89f55c\" + # Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.2577+271452d22\" # - name: x86_64-windows -> aarch64-macos # run: zig build -Dtarget=aarch64-macos x86_64-macos: @@ -39,6 +39,6 @@ jobs: - name: Setup Zig run: | brew install xz - sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.14.0-dev.1911+3bf89f55c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' + sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.14.0-dev.2577+271452d22.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' - name: build run: zig build diff --git a/generator.zig b/generator.zig index 78b21fd..b55671d 100644 --- a/generator.zig +++ b/generator.zig @@ -480,14 +480,12 @@ pub const Parser = struct { const return_type = try self.allocator.create(Type); return_type.* = .{ .void = {} }; - const ty = .{ + return self.parseTypeSuffix(.{ .function = .{ .return_type = return_type, .params = std.ArrayList(Type).init(self.allocator), }, - }; - - return self.parseTypeSuffix(ty, is_const, true); + }, is_const, true); }, .kw_instancetype => { try self.match(.kw_instancetype);