Skip to content

Commit

Permalink
Update type tags
Browse files Browse the repository at this point in the history
  • Loading branch information
segevfiner committed Feb 29, 2024
1 parent 538ee6b commit 2124edf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/language.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ using namespace Napi;

namespace node_tree_sitter::language_methods {

// tstag() {
// b2sum -l64 <(printf tree-sitter) <(printf "$1") | \
// awk '{printf "0x" toupper($1) (NR == 1 ? ", " : "\n")}'
// }
// tstag language # => 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16
const napi_type_tag LANGUAGE_TYPE_TAG = {
0x95840BEBF71E4E90, 0x9DC9419B874C0271
0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16
};

const TSLanguage *UnwrapLanguage(Napi::Value value) {
Expand Down
7 changes: 6 additions & 1 deletion src/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ namespace node_tree_sitter {

class Query : public Napi::ObjectWrap<Query> {
public:
// tstag() {
// b2sum -l64 <(printf tree-sitter) <(printf "$1") | \
// awk '{printf "0x" toupper($1) (NR == 1 ? ", " : "\n")}'
// }
// tstag query # => 0x8AF2E5212AD58ABF, 0x7B1FAB666CBD6803
static constexpr napi_type_tag TYPE_TAG = {
0x0B236F23456A4B87, 0x86BAC1E58CA6897B
0x8AF2E5212AD58ABF, 0x7B1FAB666CBD6803
};

static void Init(Napi::Env env, Napi::Object exports);
Expand Down
7 changes: 6 additions & 1 deletion src/tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,13 @@ namespace node_tree_sitter {

class Tree : public Napi::ObjectWrap<Tree> {
public:
// tstag() {
// b2sum -l64 <(printf tree-sitter) <(printf "$1") | \
// awk '{printf "0x" toupper($1) (NR == 1 ? ", " : "\n")}'
// }
// tstag tree # => 0x8AF2E5212AD58ABF, 0x7FA28BFC1966AC2D
static constexpr napi_type_tag TYPE_TAG = {
0x32EA7ED51F284DAE, 0x9BBD75ACAE8DFD7D
0x8AF2E5212AD58ABF, 0x7FA28BFC1966AC2D
};

static void Init(Napi::Env env, Napi::Object exports);
Expand Down

0 comments on commit 2124edf

Please sign in to comment.