esc

Externally Scriptable Editor

git clone git://mccd.space/esc

treesitter.h (411B)

      1 #ifndef TREESITTER_H
      2 #define TREESITTER_H
      3 #include <stddef.h>
      4 #include <stdbool.h>
      5 
      6 typedef struct TsState TsState;
      7 
      8 TsState *ts_state_create(const char *filename);
      9 void     ts_state_destroy(TsState *state);
     10 void     ts_state_parse(TsState *state, const char *text, size_t len);
     11 bool     ts_state_expand(TsState *state, int sel_start, int sel_end,
     12                          int *out_start, int *out_end);
     13 #endif