summaryrefslogtreecommitdiffstats
path: root/include/datatype.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/datatype.h')
-rw-r--r--include/datatype.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/datatype.h b/include/datatype.h
index 63617ebd..018f013a 100644
--- a/include/datatype.h
+++ b/include/datatype.h
@@ -123,6 +123,7 @@ enum datatype_flags {
DTYPE_F_PREFIX = (1 << 1),
};
+struct parse_ctx;
/**
* struct datatype
*
@@ -154,7 +155,8 @@ struct datatype {
struct output_ctx *octx);
json_t *(*json)(const struct expr *expr,
struct output_ctx *octx);
- struct error_record *(*parse)(const struct expr *sym,
+ struct error_record *(*parse)(struct parse_ctx *ctx,
+ const struct expr *sym,
struct expr **res);
const struct symbol_table *sym_tbl;
unsigned int refcnt;
@@ -166,7 +168,12 @@ extern struct datatype *datatype_get(const struct datatype *dtype);
extern void datatype_set(struct expr *expr, const struct datatype *dtype);
extern void datatype_free(const struct datatype *dtype);
-extern struct error_record *symbol_parse(const struct expr *sym,
+struct parse_ctx {
+ struct symbol_tables *tbl;
+};
+
+extern struct error_record *symbol_parse(struct parse_ctx *ctx,
+ const struct expr *sym,
struct expr **res);
extern void datatype_print(const struct expr *expr, struct output_ctx *octx);
@@ -218,7 +225,8 @@ struct symbol_table {
struct symbolic_constant symbols[];
};
-extern struct error_record *symbolic_constant_parse(const struct expr *sym,
+extern struct error_record *symbolic_constant_parse(struct parse_ctx *ctx,
+ const struct expr *sym,
const struct symbol_table *tbl,
struct expr **res);
extern void symbolic_constant_print(const struct symbol_table *tbl,