Return informative error when load_language fails

This commit is contained in:
Max Brunsfeld 2023-11-26 10:41:33 -08:00
parent e9289d3b30
commit 6fd7a1e44e
8 changed files with 246 additions and 108 deletions

View file

@ -1149,6 +1149,12 @@ const char *ts_lookahead_iterator_current_symbol_name(const TSLookaheadIterator
typedef struct wasm_engine_t TSWasmEngine;
typedef struct TSWasmStore TSWasmStore;
typedef enum {
TSWasmErrorParse,
TSWasmErrorCompile,
TSWasmErrorInstantiate,
} TSWasmError;
/**
* Create a Wasm store.
*/
@ -1170,7 +1176,9 @@ const TSLanguage *ts_wasm_store_load_language(
TSWasmStore *,
const char *name,
const char *wasm,
uint32_t wasm_len
uint32_t wasm_len,
TSWasmError *error,
char **message
);
/**