tree-sitter-c
tree-sitter-c copied to clipboard
Implicit function return type
So I recently learned functions can omit the return type. Googling this tells me this has been deprecated, but my tests still let me compile without it.
Currently, leaving out the return type will cause the function name to be misinterpreted as the type, and the rest of the highlighting will be broken. Is this something worth fixing? Is it even possible (easily), given that a function name has the same form as a custom return type?
I think it is possible; we may even already allow it over in tree-sitter-cpp because C++ constructor definitions basically look like functions with no return type.