| 84 | } |
| 85 | |
| 86 | void |
| 87 | ErrorPos::print(FILE* to) const |
| 88 | { |
| 89 | const char* type = fatal ? "error:" : "warning:"; |
| 90 | |
| 91 | if (this->line >= 0) { |
| 92 | fprintf(to, "%s:%d: %s %s\n", this->file.string(), this->line, type, this->error.string()); |
| 93 | } else { |
| 94 | fprintf(to, "%s: %s %s\n", this->file.string(), type, this->error.string()); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | // SourcePos |
| 99 | // ============================================================================= |
no test coverage detected