Create separate lexer function for keywords
This commit is contained in:
parent
16cdd2ffbe
commit
c0cc35ff07
11 changed files with 231 additions and 114 deletions
|
|
@ -81,6 +81,8 @@ typedef struct TSLanguage {
|
|||
const TSSymbol *alias_sequences;
|
||||
uint16_t max_alias_sequence_length;
|
||||
bool (*lex_fn)(TSLexer *, TSStateId);
|
||||
bool (*keyword_lex_fn)(TSLexer *, TSStateId);
|
||||
TSSymbol keyword_capture_token;
|
||||
struct {
|
||||
const bool *states;
|
||||
const TSSymbol *symbol_map;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ extern "C" {
|
|||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define TREE_SITTER_LANGUAGE_VERSION 6
|
||||
#define TREE_SITTER_LANGUAGE_VERSION 7
|
||||
|
||||
typedef unsigned short TSSymbol;
|
||||
typedef struct TSLanguage TSLanguage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue