mirror of
https://github.com/janet-lang/janet
synced 2026-10-15 20:21:40 +00:00
Version 2 of new source mapping.
This commit is contained in:
@@ -78,9 +78,10 @@ int dst_buffer_push_u32(DstBuffer *buffer, uint32_t x);
|
||||
int dst_buffer_push_u64(DstBuffer *buffer, uint64_t x);
|
||||
|
||||
/* Tuple */
|
||||
#define dst_tuple_raw(t) ((int32_t *)(t) - 2)
|
||||
#define dst_tuple_raw(t) ((int32_t *)(t) - 4)
|
||||
#define dst_tuple_length(t) (dst_tuple_raw(t)[0])
|
||||
#define dst_tuple_hash(t) ((dst_tuple_raw(t)[1]))
|
||||
#define dst_tuple_id(t) ((dst_tuple_raw(t)[2]))
|
||||
Dst *dst_tuple_begin(int32_t length);
|
||||
const Dst *dst_tuple_end(Dst *tuple);
|
||||
const Dst *dst_tuple_n(Dst *values, int32_t n);
|
||||
|
||||
@@ -507,13 +507,6 @@ struct DstFunction {
|
||||
DstFuncEnv *envs[];
|
||||
};
|
||||
|
||||
/* Parser types */
|
||||
typedef struct {
|
||||
Dst key;
|
||||
int32_t start;
|
||||
int32_t end;
|
||||
} DstParseKV;
|
||||
|
||||
typedef struct DstParseState DstParseState;
|
||||
typedef struct DstParser DstParser;
|
||||
|
||||
@@ -530,10 +523,10 @@ struct DstParser {
|
||||
const char *error;
|
||||
DstParseState *states;
|
||||
uint8_t *buf;
|
||||
DstParseKV *pm_kvs;
|
||||
const uint8_t *source; /* optional source path/string */
|
||||
DstSourceMapping *pms;
|
||||
int32_t pm_capacity;
|
||||
int32_t pm_count;
|
||||
Dst source; /* optional source path/string */
|
||||
size_t argcount;
|
||||
size_t argcap;
|
||||
size_t statecount;
|
||||
|
||||
Reference in New Issue
Block a user