diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-07-27 12:45:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 12:45:08 +0200 |
commit | 41cefe513054edd1c12f235125220dbc6b4d9451 (patch) | |
tree | 7f526960ee13c27a0ae0cdfa2d1a90a134ba2768 | |
parent | 8fe9f41f7f9da2009d11855ec0548b9dbe548a69 (diff) | |
download | rneovim-41cefe513054edd1c12f235125220dbc6b4d9451.tar.gz rneovim-41cefe513054edd1c12f235125220dbc6b4d9451.tar.bz2 rneovim-41cefe513054edd1c12f235125220dbc6b4d9451.zip |
build(deps): bump tree-sitter-c to v0.20.4 (#24495)
-rw-r--r-- | cmake.deps/deps.txt | 4 | ||||
-rw-r--r-- | runtime/queries/c/folds.scm | 3 | ||||
-rw-r--r-- | runtime/queries/c/highlights.scm | 32 | ||||
-rw-r--r-- | test/functional/treesitter/parser_spec.lua | 10 |
4 files changed, 29 insertions, 20 deletions
diff --git a/cmake.deps/deps.txt b/cmake.deps/deps.txt index c9e85f4cf4..fccb1fc517 100644 --- a/cmake.deps/deps.txt +++ b/cmake.deps/deps.txt @@ -44,8 +44,8 @@ GETTEXT_SHA256 66415634c6e8c3fa8b71362879ec7575e27da43da562c798a8a2f223e6e47f5c LIBICONV_URL https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz LIBICONV_SHA256 ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 -TREESITTER_C_URL https://github.com/tree-sitter/tree-sitter-c/archive/v0.20.2.tar.gz -TREESITTER_C_SHA256 af66fde03feb0df4faf03750102a0d265b007e5d957057b6b293c13116a70af2 +TREESITTER_C_URL https://github.com/tree-sitter/tree-sitter-c/archive/v0.20.4.tar.gz +TREESITTER_C_SHA256 393a4208803de81c968dfc02c666aeb934971666e565345dff7445c6e0f06f8d TREESITTER_LUA_URL https://github.com/MunifTanjim/tree-sitter-lua/archive/v0.0.18.tar.gz TREESITTER_LUA_SHA256 659beef871a7fa1d9a02c23f5ebf55019aa3adce6d7f5441947781e128845256 TREESITTER_VIM_URL https://github.com/neovim/tree-sitter-vim/archive/v0.3.0.tar.gz diff --git a/runtime/queries/c/folds.scm b/runtime/queries/c/folds.scm index 80c3039b6b..5a35334a24 100644 --- a/runtime/queries/c/folds.scm +++ b/runtime/queries/c/folds.scm @@ -13,7 +13,8 @@ (preproc_else) (preproc_ifdef) (initializer_list) + (gnu_asm_expression) ] @fold - (compound_statement +(compound_statement (compound_statement) @fold) diff --git a/runtime/queries/c/highlights.scm b/runtime/queries/c/highlights.scm index 523a792403..ef70a7103c 100644 --- a/runtime/queries/c/highlights.scm +++ b/runtime/queries/c/highlights.scm @@ -8,9 +8,14 @@ "typedef" "union" "goto" + "asm" + "__asm__" ] @keyword -"sizeof" @keyword.operator +[ + "sizeof" + "offsetof" +] @keyword.operator "return" @keyword.return @@ -36,6 +41,8 @@ "#else" "#elif" "#endif" + "#elifdef" + "#elifndef" (preproc_directive) ] @preproc @@ -43,7 +50,7 @@ "#include" @include -[ ";" ":" "," ] @punctuation.delimiter +[ ";" ":" "," "::" ] @punctuation.delimiter "..." @punctuation.special @@ -98,8 +105,8 @@ (comma_expression [ "," ] @operator) [ - (true) - (false) + (true) + (false) ] @boolean (conditional_expression [ "?" ":" ] @conditional.ternary) @@ -112,10 +119,8 @@ (number_literal) @number (char_literal) @character -[ - (preproc_arg) - (preproc_defined) -] @function.macro +((preproc_arg) @function.macro (#set! "priority" 90)) +(preproc_defined) @function.macro (((field_expression (field_identifier) @property)) @_parent @@ -135,7 +140,10 @@ (storage_class_specifier) @storageclass -(type_qualifier) @type.qualifier +[ + (type_qualifier) + (gnu_asm_qualifier) +] @type.qualifier (linkage_specification "extern" @storageclass) @@ -195,15 +203,15 @@ [ "__attribute__" + "__declspec" + "__based" "__cdecl" "__clrcall" "__stdcall" "__fastcall" "__thiscall" "__vectorcall" - "_unaligned" - "__unaligned" - "__declspec" + (ms_pointer_modifier) (attribute_declaration) ] @attribute diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index ae26b92f52..f0144e6f6d 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -194,8 +194,8 @@ void ui_refresh(void) local firstrun = q(1) local manyruns = q(100) - -- First run should be at least 400x slower than an 100 subsequent runs. - local factor = is_os('win') and 200 or 400 + -- First run should be at least 200x slower than an 100 subsequent runs. + local factor = is_os('win') and 100 or 200 assert(factor * manyruns < firstrun, ('firstrun: %f ms, manyruns: %f ms'):format(firstrun / 1e6, manyruns / 1e6)) end) @@ -765,9 +765,9 @@ int x = INT_MAX; eq("table", exec_lua("return type(parser:children().c)")) eq({ {0, 0, 7, 0}, -- root tree - {3, 15, 3, 16}, -- VALUE 123 - {4, 16, 4, 17}, -- VALUE1 123 - {5, 16, 5, 17}, -- VALUE2 123 + {3, 16, 3, 16}, -- VALUE 123 + {4, 17, 4, 17}, -- VALUE1 123 + {5, 17, 5, 17}, -- VALUE2 123 {1, 26, 1, 63}, -- READ_STRING(x, y) (char *)read_string((x), (size_t)(y)) {2, 29, 2, 66} -- READ_STRING_OK(x, y) (char *)read_string((x), (size_t)(y)) }, get_ranges()) |