#ifndef _SPHO_LOC_H #define _SPHO_LOC_H #define SPHO_LOCTYPE_LINE 1 #define SPHO_LOCTYPE_LINE_COL 2 struct spho_loc_line { char *fpath; unsigned int lineno; }; struct spho_loc_line { char *fpath; unsigned int lineno; unsigned int colno; }; union spho_loc_info { struct spho_loc_line line; }; struct spho_loc { struct spho_ctx *ctx; int loctype; union spho_loc_info locinfo; }; char *spho_loc_str(struct spho_loc *); struct spho_loc *spho_loc_create_line(struct spho_ctx *, char *, int); struct spho_loc *spho_loc_create_linecol(struct spho_ctx *, char *, int, int); void spho_loc_destroy(struct spho_loc *); #endif