aboutsummaryrefslogtreecommitdiff
path: root/src/errmsg.hpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-27 00:01:49 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-27 00:01:49 -0700
commit0278468479d52d6ea64521ab78574b593a6832ae (patch)
treed7438d5c45de76b453efa7d3fab5a33ea27db347 /src/errmsg.hpp
parentac085a869d068ca60548ad5298682ff054e91141 (diff)
downloadzig-0278468479d52d6ea64521ab78574b593a6832ae.tar.gz
zig-0278468479d52d6ea64521ab78574b593a6832ae.zip
upgrade to the libclang C++ API
c_import creates a tmp .h file and parses it with libclang, reporting any errors found. See #88
Diffstat (limited to 'src/errmsg.hpp')
-rw-r--r--src/errmsg.hpp14
1 files changed, 10 insertions, 4 deletions
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<int> *line_offsets;
+ Buf line_buf;
+
+ ZigList<ErrorMsg *> 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<int> *line_offsets, Buf *msg);
+
#endif