2022-01-03 10:57:01 -08:00
|
|
|
#ifndef TREE_SITTER_WASM_H_
|
|
|
|
|
#define TREE_SITTER_WASM_H_
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2022-09-06 22:41:05 -07:00
|
|
|
#include "tree_sitter/api.h"
|
2024-02-02 00:56:52 -05:00
|
|
|
#include "./parser.h"
|
2022-01-03 10:57:01 -08:00
|
|
|
|
2024-09-27 13:22:00 -04:00
|
|
|
bool ts_wasm_store_start(TSWasmStore *self, TSLexer *lexer, const TSLanguage *language);
|
|
|
|
|
void ts_wasm_store_reset(TSWasmStore *self);
|
|
|
|
|
bool ts_wasm_store_has_error(const TSWasmStore *self);
|
2022-09-07 14:40:11 -07:00
|
|
|
|
2024-09-27 13:22:00 -04:00
|
|
|
bool ts_wasm_store_call_lex_main(TSWasmStore *self, TSStateId state);
|
|
|
|
|
bool ts_wasm_store_call_lex_keyword(TSWasmStore *self, TSStateId state);
|
2022-09-07 14:40:11 -07:00
|
|
|
|
2024-09-27 13:22:00 -04:00
|
|
|
uint32_t ts_wasm_store_call_scanner_create(TSWasmStore *self);
|
|
|
|
|
void ts_wasm_store_call_scanner_destroy(TSWasmStore *self, uint32_t scanner_address);
|
|
|
|
|
bool ts_wasm_store_call_scanner_scan(TSWasmStore *self, uint32_t scanner_address, uint32_t valid_tokens_ix);
|
|
|
|
|
uint32_t ts_wasm_store_call_scanner_serialize(TSWasmStore *self, uint32_t scanner_address, char *buffer);
|
|
|
|
|
void ts_wasm_store_call_scanner_deserialize(TSWasmStore *self, uint32_t scanner, const char *buffer, unsigned length);
|
2022-01-03 10:57:01 -08:00
|
|
|
|
2024-09-27 13:22:00 -04:00
|
|
|
void ts_wasm_language_retain(const TSLanguage *self);
|
|
|
|
|
void ts_wasm_language_release(const TSLanguage *self);
|
2023-12-27 14:54:38 -08:00
|
|
|
|
2022-01-03 10:57:01 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif // TREE_SITTER_WASM_H_
|