added type grammar to readme, add example, del spho loc
This commit is contained in:
parent
a22c9726cd
commit
7e3c7c88ea
3 changed files with 47 additions and 35 deletions
|
@ -1,34 +0,0 @@
|
|||
#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
|
Loading…
Add table
Add a link
Reference in a new issue