diff --git a/grammar.js b/grammar.js index 4119447..4df6abd 100644 --- a/grammar.js +++ b/grammar.js @@ -1476,7 +1476,7 @@ module.exports = grammar({ seq('\\', choice( /[^xu]/, /u[0-9a-fA-F]{4}/, - /u{[0-9a-fA-F]+}/, + /u\{[0-9a-fA-F]+\}/, /x[0-9a-fA-F]{2}/, )), /[^\\']/, @@ -1489,7 +1489,7 @@ module.exports = grammar({ choice( /[^xu]/, /u[0-9a-fA-F]{4}/, - /u{[0-9a-fA-F]+}/, + /u\{[0-9a-fA-F]+\}/, /x[0-9a-fA-F]{2}/, ), )), diff --git a/src/grammar.json b/src/grammar.json index 5eb3267..87d888c 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -8553,7 +8553,7 @@ }, { "type": "PATTERN", - "value": "u{[0-9a-fA-F]+}" + "value": "u\\{[0-9a-fA-F]+\\}" }, { "type": "PATTERN", @@ -8603,7 +8603,7 @@ }, { "type": "PATTERN", - "value": "u{[0-9a-fA-F]+}" + "value": "u\\{[0-9a-fA-F]+\\}" }, { "type": "PATTERN", diff --git a/src/parser.c b/src/parser.c index 636bc7b..a028402 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,7 +1,6 @@ #include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif @@ -193334,10 +193333,12 @@ unsigned tree_sitter_rust_external_scanner_serialize(void *, char *); void tree_sitter_rust_external_scanner_deserialize(void *, const char *, unsigned); #ifdef _WIN32 -#define extern __declspec(dllexport) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) #endif -extern const TSLanguage *tree_sitter_rust(void) { +TS_PUBLIC const TSLanguage *tree_sitter_rust() { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT,