summaryrefslogtreecommitdiff
path: root/package.c
diff options
context:
space:
mode:
Diffstat (limited to 'package.c')
-rw-r--r--package.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/package.c b/package.c
index 1ad2c4f..beb7b0a 100644
--- a/package.c
+++ b/package.c
@@ -128,6 +128,14 @@ static void export_location(Exporter *ex, Location where) {
export_vlq(ex, (U64)where.start->pos.line);
}
}
+static Location import_location(Importer *im) {
+ Location l;
+ l.start = NULL;
+ l.simple_location = imptr_malloc(im, sizeof *l.simple_location);
+ l.simple_location->ctx = &im->err_ctx;
+ l.simple_location->line = (U32)import_vlq(im);
+ return l;
+}
static inline void export_ident(Exporter *ex, Identifier i) {
if (!i->export_id) {