This merge requests fixes the issue that column info was lost in basically all code during the typecheck phase, it mostly swapped LINE_TO_LOC with NODE_LOCATION where possible.
A size_t end_col was also added to the struct location to include the end of token when possible for improved error messaging, some error printing functions also have been changed to show it like
<file>:<line>:<col>-<end_col>:<severity> <message> when possible with carets (^) under the code from col to end_col.
I also wrote code to properly compute function-call end_col in ct_fun.c#269, this line would cause compiler crashes if NODE_LOCATION(fundef) was used and using it on assign would show incorrect column range
which was the most important location for most common errors to include the col and end_col data.
I basically did a ctrl+shift+f to search throughout the repository where column info was being set/used and tried to do similar things for end_col, I am not quite sure if I missed some spots or added things that were unnecessary, I did manually build and run the compiler to test the VSCode extension I am working on and it all still seemed to work...
Note that there are quite some changes that have nothing to do with token location at all, apparently much code wasn't formatted and when I saved the files I worked in VSCode would automatically format according to the
.clang-formatprovided in the root of the repository.