diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-11-03 13:36:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 13:36:25 +0100 |
commit | a766695c8b2c0b53b0b9f9f17bcff117183b21f9 (patch) | |
tree | d92dde6246c41e43432ca169e3d1ca3f4af290b7 /src/tree_sitter/bits.h | |
parent | a061d53e18168130aad537a9e8012390834ff8c2 (diff) | |
parent | 8e73cf67314095fe7240be5e57232ea3d20aac94 (diff) | |
download | rneovim-a766695c8b2c0b53b0b9f9f17bcff117183b21f9.tar.gz rneovim-a766695c8b2c0b53b0b9f9f17bcff117183b21f9.tar.bz2 rneovim-a766695c8b2c0b53b0b9f9f17bcff117183b21f9.zip |
Merge pull request #12931 from vigoux/treesitter-bundled
bundle: move tree-sitter as a bundled dep
Diffstat (limited to 'src/tree_sitter/bits.h')
-rw-r--r-- | src/tree_sitter/bits.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/tree_sitter/bits.h b/src/tree_sitter/bits.h deleted file mode 100644 index ce7a715567..0000000000 --- a/src/tree_sitter/bits.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef TREE_SITTER_BITS_H_ -#define TREE_SITTER_BITS_H_ - -#include <stdint.h> - -static inline uint32_t bitmask_for_index(uint16_t id) { - return (1u << (31 - id)); -} - -#if defined _WIN32 && !defined __GNUC__ - -#include <intrin.h> - -static inline uint32_t count_leading_zeros(uint32_t x) { - if (x == 0) return 32; - uint32_t result; - _BitScanReverse(&result, x); - return 31 - result; -} - -#else - -static inline uint32_t count_leading_zeros(uint32_t x) { - if (x == 0) return 32; - return __builtin_clz(x); -} - -#endif -#endif // TREE_SITTER_BITS_H_ |