Commit graph

15 commits

Author SHA1 Message Date
Max Brunsfeld
584b55df8d Delete unused code, tweak whitespace 2022-01-19 16:54:57 -08:00
Patrick Thomson
3e4cda8353 Fix check in ts_language_symbol_type (#997)
As per Max's advice, this function should only return
`TSSymbolTypeRegular` when the metadata is both visible and named.
2021-03-17 14:12:58 -04:00
Max Brunsfeld
774ae5e3d5 In parse tables, store production ids as 16 bits
Also remove the use of bitfields from the parse table format.
In all cases, bitfields were not necessary to achieve the
current binary sizes. Avoiding them makes the binaries more
portable.

There was no way to make this change backward-compatible,
so we have finally dropped support for parsers generated
with an earlier version of Tree-sitter.

At some point, when Atom adopts this version of Tree-sitter,
this change will affect Atom users who have installed packages
using third-party Tree-sitter parsers. The packages will need
to be updated to use a regenerated version of the parsers.
2021-02-25 16:12:31 -08:00
Max Brunsfeld
b5a9adb555 Allow queries to match on supertypes
Co-authored-by: Ayman Nadeem <aymannadeem@github.com>
2020-09-21 12:34:48 -07:00
Riccardo Schirone
780e9cecc9 Do not use multiple unnamed structs inside of unions 2020-04-29 20:42:45 +02:00
Tuấn-Anh Nguyễn
23261c4f6f Make ts_language_symbol_name return NULL for out-of-bound ids 2020-02-27 22:24:00 +07:00
Tuấn-Anh Nguyễn
c719e24a45 Make ts_language_field_name_for_id return NULL for out-of-bound id 2020-02-27 21:19:08 +07:00
Max Brunsfeld
56c620c005 Store a mapping to ensure no two symbols map to the same metadata 2019-12-05 17:21:46 -08:00
Max Brunsfeld
ce633a85c6 Improve ts_language_symbol_for_name function 2019-11-15 14:21:13 -08:00
Max Brunsfeld
49ce2fddb9 Add wasm binding for running tree queries in a limited range 2019-09-12 12:14:04 -07:00
Max Brunsfeld
09a2755399 Store parse states with few lookahead symbols in a more compact way 2019-08-29 15:52:23 -07:00
Max Brunsfeld
9f608435ee Fix errors in when languages have no fields 2019-02-12 17:20:12 -08:00
Max Brunsfeld
18a13b457d Get basic field API working 2019-02-08 15:16:56 -08:00
Max Brunsfeld
dd416b0955 Update include paths to not reference 'runtime' directory 2019-01-04 17:33:34 -08:00
Max Brunsfeld
47607cecf4 Reorganize repo, add rust CLI and binding code, 2019-01-04 17:31:49 -08:00