| 1123 | String Reader::getFormatedErrorMessages() const { return getFormattedErrorMessages(); } |
| 1124 | |
| 1125 | String Reader::getFormattedErrorMessages() const |
| 1126 | { |
| 1127 | String formattedMessage; |
| 1128 | for (const auto &error : errors_) |
| 1129 | { |
| 1130 | formattedMessage += "* " + getLocationLineAndColumn(error.token_.start_) + "\n"; |
| 1131 | formattedMessage += " " + error.message_ + "\n"; |
| 1132 | if (error.extra_) |
| 1133 | formattedMessage += "See " + getLocationLineAndColumn(error.extra_) + " for detail.\n"; |
| 1134 | } |
| 1135 | return formattedMessage; |
| 1136 | } |
| 1137 | |
| 1138 | std::vector<Reader::StructuredError> Reader::getStructuredErrors() const |
| 1139 | { |