Files
jq/locfile.h
T

27 lines
478 B
C
Raw Normal View History

#ifndef _LOCFILE_H
#define _LOCFILE_H
2013-05-26 12:42:04 +10:00
2013-11-30 02:05:42 -06:00
#include "jq.h"
typedef struct {
int start, end;
} location;
static const location UNKNOWN_LOCATION = {-1, -1};
struct locfile {
const char* data;
int length;
int* linemap;
int nlines;
2013-11-30 02:05:42 -06:00
char *error;
jq_state *jq;
};
2013-11-30 02:05:42 -06:00
void locfile_init(struct locfile* l, jq_state *jq, const char* data, int length);
2013-05-26 12:42:04 +10:00
void locfile_free(struct locfile* l);
2013-05-26 12:42:04 +10:00
void locfile_locate(struct locfile* l, location loc, const char* fmt, ...);
#endif