Home » Community » U++ community news and announcements » Better Skylark/witz error reporting via new CParser feature
Better Skylark/witz error reporting via new CParser feature [message #43040] |
Sat, 26 April 2014 12:00 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
As mentioned in this thread:
http://www.ultimatepp.org/forums/index.php?t=msg&goto=42 914&#msg_42914
Skylark was giving confusing error message when error was in included template or expanded macro (because the text originated in different file).
Also throwing the exception in that case was not perhaps the best possible scenario.
To resolve the issue, I have "invented" a special form of comment recognized by CParser, that, from lexical point of view, acts like whitespace, but changes the file and line and column info in CParser.
This block can be generated by
static String LineInfoComment(const String& filename, int line = 1, int column = 1);
String GetLineInfoComment(int tabsize = 4) const;
functions and in text is simply begin-end delimited by CParser::LINEINFO_ESC = '\2'.
This is then used with witz to fix the error handling...
[Updated on: Sat, 26 April 2014 12:00] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 04 14:32:25 CEST 2024
Total time taken to generate the page: 0.02471 seconds
|