From 0278468479d52d6ea64521ab78574b593a6832ae Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 27 Jan 2016 00:01:49 -0700 Subject: upgrade to the libclang C++ API c_import creates a tmp .h file and parses it with libclang, reporting any errors found. See #88 --- src/errmsg.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/errmsg.hpp') diff --git a/src/errmsg.hpp b/src/errmsg.hpp index 1f31020902..b16249ec0b 100644 --- a/src/errmsg.hpp +++ b/src/errmsg.hpp @@ -20,14 +20,20 @@ enum ErrColor { struct ErrorMsg { int line_start; int column_start; - int line_end; - int column_end; Buf *msg; Buf *path; - Buf *source; - ZigList *line_offsets; + Buf line_buf; + + ZigList notes; }; void print_err_msg(ErrorMsg *msg, ErrColor color); +void err_msg_add_note(ErrorMsg *parent, ErrorMsg *note); +ErrorMsg *err_msg_create_with_offset(Buf *path, int line, int column, int offset, + const char *source, Buf *msg); + +ErrorMsg *err_msg_create_with_line(Buf *path, int line, int column, + Buf *source, ZigList *line_offsets, Buf *msg); + #endif -- cgit v1.2.3