⬆️ tree-sitter-cli, add explicit word token
This commit is contained in:
parent
7b003599b3
commit
44b3de2594
|
@ -43,6 +43,8 @@ module.exports = grammar({
|
|||
token(choice(/\s/, '\\\n')),
|
||||
],
|
||||
|
||||
word: $ => $.word,
|
||||
|
||||
rules: {
|
||||
program: $ => repeat($._terminated_statement),
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
"nan": "^2.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tree-sitter-cli": "^0.12.2"
|
||||
"tree-sitter-cli": "^0.12.6"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tree-sitter generate && node-gyp build",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "bash",
|
||||
"word": "word",
|
||||
"rules": {
|
||||
"program": {
|
||||
"type": "REPEAT",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -13,7 +13,10 @@ extern "C" {
|
|||
#define ts_builtin_sym_end 0
|
||||
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
|
||||
|
||||
#ifndef TREE_SITTER_RUNTIME_H_
|
||||
typedef uint16_t TSSymbol;
|
||||
typedef struct TSLanguage TSLanguage;
|
||||
#endif
|
||||
|
||||
typedef uint16_t TSStateId;
|
||||
|
||||
|
@ -67,7 +70,7 @@ typedef union {
|
|||
};
|
||||
} TSParseActionEntry;
|
||||
|
||||
typedef struct TSLanguage {
|
||||
struct TSLanguage {
|
||||
uint32_t version;
|
||||
uint32_t symbol_count;
|
||||
uint32_t alias_count;
|
||||
|
@ -92,7 +95,7 @@ typedef struct TSLanguage {
|
|||
unsigned (*serialize)(void *, char *);
|
||||
void (*deserialize)(void *, const char *, unsigned);
|
||||
} external_scanner;
|
||||
} TSLanguage;
|
||||
};
|
||||
|
||||
/*
|
||||
* Lexer Macros
|
||||
|
|
Loading…
Reference in New Issue