Skip to content

WIP: GCC style errors

Roy Jacobs requested to merge RoyJacobs/kickc:gcc-style-errors into master

I've added support for formatting CompileErrors when compiling via the KickC class. This gets handled by a new class ErrorFormatter. Whenever a StatementSource is available in the CompileError it will use that, otherwise the formatter will simply pass-through the exception message like before.

The same formatter could potentially be used in the logging class as well to handle formatting of warnings (a new CompileWarning class could be introduced for that). Such a restructuring could then even be extended some more to also be able to treat warnings as errors and so on.

I haven't had a chance to do extensive testing yet, sorry. Existing tests pass, though. And I've added a quick test for the formatter as well. (edit: Ironically, that one is now failing on the build machine. I'll try to add some debug code to see what's going on, probably related to path handling)

The first commit in this MR removes the .idea folder, feel free to cherry-pick and ignore that one, of course :)

Anyway, feel free to review and leave some comments.

Edited by Roy Jacobs

Merge request reports

Loading