⬆️ tree-sitter-cli
This commit is contained in:
parent
fd6567ba3a
commit
2d081f4bb2
14
index.js
14
index.js
|
@ -1 +1,13 @@
|
|||
module.exports = require("./build/Release/tree_sitter_bash_binding");
|
||||
try {
|
||||
module.exports = require("./build/Release/tree_sitter_bash_binding");
|
||||
} catch (error) {
|
||||
try {
|
||||
module.exports = require("./build/Debug/tree_sitter_bash_binding");
|
||||
} catch (_) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
module.exports.nodeTypeInfo = require("./src/node-types.json");
|
||||
} catch (_) {}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"devDependencies": {
|
||||
"nodemon": "^1.18.3",
|
||||
"prebuild": "^7.6.1",
|
||||
"tree-sitter-cli": "^0.14.7"
|
||||
"tree-sitter-cli": "^0.15.3"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tree-sitter generate && node-gyp build",
|
||||
|
|
|
@ -2385,5 +2385,7 @@
|
|||
"_primary_expression",
|
||||
"_simple_variable_name",
|
||||
"_special_variable_name"
|
||||
]
|
||||
],
|
||||
"supertypes": []
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -15,9 +15,21 @@ extern "C" {
|
|||
|
||||
#ifndef TREE_SITTER_API_H_
|
||||
typedef uint16_t TSSymbol;
|
||||
typedef uint16_t TSFieldId;
|
||||
typedef struct TSLanguage TSLanguage;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
TSFieldId field_id;
|
||||
uint8_t child_index;
|
||||
bool inherited;
|
||||
} TSFieldMapEntry;
|
||||
|
||||
typedef struct {
|
||||
uint16_t index;
|
||||
uint16_t length;
|
||||
} TSFieldMapSlice;
|
||||
|
||||
typedef uint16_t TSStateId;
|
||||
|
||||
typedef struct {
|
||||
|
@ -54,7 +66,7 @@ typedef struct {
|
|||
TSSymbol symbol;
|
||||
int16_t dynamic_precedence;
|
||||
uint8_t child_count;
|
||||
uint8_t alias_sequence_id;
|
||||
uint8_t production_id;
|
||||
};
|
||||
} params;
|
||||
TSParseActionType type : 4;
|
||||
|
@ -92,12 +104,16 @@ struct TSLanguage {
|
|||
struct {
|
||||
const bool *states;
|
||||
const TSSymbol *symbol_map;
|
||||
void *(*create)();
|
||||
void *(*create)(void);
|
||||
void (*destroy)(void *);
|
||||
bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist);
|
||||
unsigned (*serialize)(void *, char *);
|
||||
void (*deserialize)(void *, const char *, unsigned);
|
||||
} external_scanner;
|
||||
uint32_t field_count;
|
||||
const TSFieldMapSlice *field_map_slices;
|
||||
const TSFieldMapEntry *field_map_entries;
|
||||
const char **field_names;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue