668 |
struct ParserIssue { |
struct ParserIssue { |
669 |
String txt; ///< Human readable explanation text of the parser issue. |
String txt; ///< Human readable explanation text of the parser issue. |
670 |
int line; ///< Line number within the script where this issue was encountered. |
int line; ///< Line number within the script where this issue was encountered. |
671 |
|
int column; ///< Column within the script where this issue was encountered. |
672 |
ParserIssueType_t type; ///< Whether this issue is either a parser error or just a parser warning. |
ParserIssueType_t type; ///< Whether this issue is either a parser error or just a parser warning. |
673 |
|
|
674 |
/** |
/** |
677 |
inline void dump() { |
inline void dump() { |
678 |
switch (type) { |
switch (type) { |
679 |
case PARSER_ERROR: |
case PARSER_ERROR: |
680 |
printf("[ERROR] line %d: %s\n", line, txt.c_str()); |
printf("[ERROR] line %d, column %d: %s\n", line, column, txt.c_str()); |
681 |
break; |
break; |
682 |
case PARSER_WARNING: |
case PARSER_WARNING: |
683 |
printf("[Warning] line %d: %s\n", line, txt.c_str()); |
printf("[Warning] line %d, column %d: %s\n", line, column, txt.c_str()); |
684 |
break; |
break; |
685 |
} |
} |
686 |
} |
} |