Get wasm.c compiling when wasm feature is disabled

This commit is contained in:
Max Brunsfeld 2022-10-24 15:59:55 -07:00
parent 7eb3e504db
commit 9cbeaf27da

View file

@ -1154,6 +1154,22 @@ bool ts_language_is_wasm(const TSLanguage *self) {
#else
bool ts_wasm_store_start(
TSWasmStore *self,
TSLexer *lexer,
const TSLanguage *language
) {
(void)self;
(void)lexer;
(void)language;
return false;
}
void ts_wasm_store_stop(TSWasmStore *self) {
(void)self;
}
bool ts_wasm_store_call_lex_main(TSWasmStore *self, TSStateId state) {
(void)self;
(void)state;
@ -1166,12 +1182,52 @@ bool ts_wasm_store_call_lex_keyword(TSWasmStore *self, TSStateId state) {
return false;
}
void ts_wasm_store_call_scanner_create() {}
void ts_wasm_store_call_scanner_deserialize() {}
void ts_wasm_store_call_scanner_destroy() {}
void ts_wasm_store_call_scanner_scan() {}
void ts_wasm_store_call_scanner_serialize() {}
void ts_wasm_store_start() {}
uint32_t ts_wasm_store_call_scanner_create(TSWasmStore *self) {
(void)self;
return 0;
}
void ts_wasm_store_call_scanner_destroy(
TSWasmStore *self,
uint32_t scanner_address
) {
(void)self;
(void)scanner_address;
}
bool ts_wasm_store_call_scanner_scan(
TSWasmStore *self,
uint32_t scanner_address,
uint32_t valid_tokens_ix
) {
(void)self;
(void)scanner_address;
(void)valid_tokens_ix;
return false;
}
uint32_t ts_wasm_store_call_scanner_serialize(
TSWasmStore *self,
uint32_t scanner_address,
char *buffer
) {
(void)self;
(void)scanner_address;
(void)buffer;
return 0;
}
void ts_wasm_store_call_scanner_deserialize(
TSWasmStore *self,
uint32_t scanner_address,
const char *buffer,
unsigned length
) {
(void)self;
(void)scanner_address;
(void)buffer;
(void)length;
}
bool ts_language_is_wasm(const TSLanguage *self) {
(void)self;