pherrymason / c3-lsp

Language Server for C3 Language
https://pherrymason.github.io/c3-lsp/
GNU General Public License v3.0
75 stars 10 forks source link

Fix function unnamed argument types not being resolved correctly #68

Closed insertt closed 2 months ago

insertt commented 2 months ago

This PR fixes issue with functions that have unnamed arguments not being parsed correctly and in result types of the parameters are incorrectly resolved.

Previously, function declarations such as:

module glfw;

def WindowRef = void*;
def MonitorRef = void*;

extern fn WindowRef createWindow(int, int, char*, MonitorRef, WindowRef) @extern("glfwCreateWindow");

were parsed and resolved into this form that had incorrect types: image

but with this change, they're now correctly resolved and unnamed parameters have generic parameter names in format $arg{position} to not clash with other possible declarations: image

pherrymason commented 2 months ago

Thank you!