ziglang / zig-spec

MIT License
170 stars 32 forks source link

implement the callconv annotation #17

Closed Scr0nch closed 3 years ago

Scr0nch commented 4 years ago

Currently, the following code fails to parse:

const std = @import("std");

pub fn main() callconv(.C) void {
    std.debug.warn("Hello world!\n", .{});
}

Implementing the calling convention section for the function prototype rule fixes the issue. This implementation is based on the changes in this pull request in the zig repository.