Tuấn-Anh Nguyễn
8e6220a0c5
Allow QueryCursor::matches' text_callback to return any AsRef<[u8]> ( #488 )
2019-11-17 10:40:06 -08:00
Max Brunsfeld
ce633a85c6
Improve ts_language_symbol_for_name function
2019-11-15 14:21:13 -08:00
Max Brunsfeld
b4a2f4ed60
Fix debug/release conditional compilation flags for free()
2019-11-15 10:09:22 -08:00
Max Brunsfeld
967da88371
Avoid unnecessary recompiles between debug & test builds
...
This makes development much quicker when switching back and forth
between compiling with RLS while editing and running tests with
`cargo test`.
2019-11-14 13:34:25 -08:00
Emily Marigold Klassen
1d2f171067
binding_web: fix typo in fieldNameForId ( #481 )
2019-11-08 21:55:08 -08:00
Max Brunsfeld
78f800935e
binding_rust: 0.5.0
2019-11-08 14:22:01 -08:00
Max Brunsfeld
1909ae2cee
binding_rust: Improve node children APIs
...
Closes #480
2019-11-08 14:20:10 -08:00
Max Brunsfeld
c6d1bd2b04
Fix a few rustdoc links
2019-11-08 12:43:26 -08:00
Max Brunsfeld
662af0afc1
binding_rust: 0.4.0
2019-11-08 12:30:58 -08:00
Max Brunsfeld
d68dfa78b2
Add misssing docs to rust binding
2019-11-08 12:29:26 -08:00
Max Brunsfeld
a7824cf59d
Fix docs for ts_node_is_extra
...
Fixes #446
2019-11-05 09:49:16 -08:00
Max Brunsfeld
d765332c61
Don't rely on new eof ABI in parsers unless --next-abi is passed
2019-10-31 14:32:50 -07:00
Max Brunsfeld
d3b7caa565
Add a TSLexer.eof() API, use it in generated parsers
2019-10-31 14:11:52 -07:00
Max Brunsfeld
a62b7a70f3
Lexer: track EOF state without relying on null character as lookahead
2019-10-31 14:11:52 -07:00
Max Brunsfeld
5a3a672e30
Expand on query docs
2019-10-30 10:26:10 -07:00
Max Brunsfeld
077cd4970c
Handle empty list of included ranges w/ non-null pointer
2019-10-29 13:45:04 -07:00
Max Brunsfeld
42dfba29c6
Make ts_tree_get_changed_ranges less confusing
2019-10-28 15:33:41 -07:00
Björn Linse
124ae30138
fix invalid docs for ts_tree_get_changed_ranges
2019-10-25 21:19:33 +02:00
George Fraser
1346929e66
Parser.Language.load takes a path ( #471 )
2019-10-23 08:53:15 -07:00
Max Brunsfeld
4af16dc0ac
web: 0.15.10
2019-10-22 13:00:51 -07:00
Max Brunsfeld
f736cb3896
web: Implement TreeCursor.nodeText
...
Refs #466
2019-10-22 12:58:27 -07:00
Max Brunsfeld
6cd82574a3
Merge pull request #469 from tree-sitter/non-terminal-extras
...
Allow non-terminal extras
2019-10-21 18:47:45 -07:00
Max Brunsfeld
7ccec8c0e2
Tweak wasm binding to work with new upstream LLVM backend
2019-10-21 16:10:29 -07:00
Max Brunsfeld
fcaabea0cf
Allow non-terminal extras
2019-10-21 16:08:59 -07:00
Max Brunsfeld
e14e285a10
cli: Check queries when running tree-sitter test
2019-10-18 14:44:16 -07:00
Max Brunsfeld
64c6cf4473
Implicitly reset parser's state if language is changed after a timeout
2019-10-18 11:28:59 -07:00
Max Brunsfeld
b79295e1a0
🔥 Everything related to property sheets
2019-10-17 11:00:31 -07:00
Max Brunsfeld
fa43ce01a6
Allow queries to capture ERROR nodes
2019-10-16 11:54:32 -07:00
Max Brunsfeld
060e00463d
Implement include-children directive in injection queries
2019-10-14 17:38:42 -07:00
Max Brunsfeld
324c259cbb
rust: Create readable messages for query syntax errors
2019-10-14 12:30:22 -07:00
Max Brunsfeld
a45dc67390
Loosen unnecessary lifetime restriction in rust QueryCursor APIs
2019-10-14 12:30:22 -07:00
Max Brunsfeld
f490befcde
Add ts_query_disable_capture API
2019-10-14 12:30:22 -07:00
Max Brunsfeld
4c17af3ecd
Allow queries with no patterns
2019-10-14 12:30:22 -07:00
Max Brunsfeld
c153711539
query: Avoid splitting states on nodes that don't contain captures
2019-10-14 12:30:22 -07:00
Matthew Krupcale
ee9a3c0ebb
lib: remove utf8proc dependency ( #436 )
...
* Remove dependency on utf8proc
This removes the only external dependency on utf8proc for UTF-8 decoding. It does so by implementing its own UTF-8 decoder. This decoder is both faster and has a simpler API.
* .gitmodules: remove utf8proc submodule
* docs/section-2-using-parsers.md: remove requirement for utf8proc submodule
* docs/section-6-contributing.md: likewise
* lib/Cargo.toml: remove utf8proc subdirectory package include
* lib/README.md: remove utf8proc subdirectory description
* lib/binding_rust/build.rs: remove utf8proc compiler include directory
* lib/src/lexer.c: remove utf8proc dependencies and types
* lib/src/lib.c: remove utf8proc dependency
* lib/src/unicode.h: define types for Unicode decoders
* lib/src/utf16.{c,h}: implement more readable UTF-16 decoder
* lib/src/utf8.{c,h}: implement fast UTF-8 decoder
* lib/utf8proc: remove utf8proc submodule directory
* script/build-lib: remove utf8proc compiler include directory
* script/build-wasm: likewise
* Optimize ts_lexer__get_lookahead.
Try to favor non-failure code path and assign lookahead values directly to lexer
* lib/src/lexer.c: optimize for non-failure code path
* Fix some compiler errors
* lib/src/lexer.c: cast from signed to unsigned for decode_next result
* lib/src/utf16.c: fix non-constant initializers for older compilers
* Remove some missed remnants of utf8proc
* docs/section-2-using-parsers.md: only two include paths necessary now
* lib/src/lib.c: no need to define UTF8PROC_STATIC
* Use ICU's utf8 and utf16 decoding routines
* Remove unnecessary casts when calling icu macros
* Check buffer length before attempting to decode a unicode character
* Use new unicode function when parsing Queries
Co-Authored-By: Matthew Krupcale <mkrupcale@matthewkrupcale.com>
* Mark libicu files as vendored for GitHub's stats
2019-10-14 11:18:39 -07:00
Ika
979b46e297
fix(web-tree-sitter): add missing types
2019-10-04 20:16:13 +08:00
Max Brunsfeld
015be68c94
rust: Generalize text_callback type for query methods
2019-10-03 12:53:14 -07:00
Max Brunsfeld
9872a083b7
rust: Change QueryCursor::captures to expose the full match
2019-10-03 12:45:58 -07:00
Max Brunsfeld
cb87b7b76e
Fix invalid read by query cursor on error nodes
...
🎩 @bfredl
Refs https://github.com/tree-sitter/tree-sitter/pull/448#issuecomment-536337749
2019-10-01 11:28:51 -07:00
Björn Linse
1d2d043390
fix compiler warning with comparing char with `TSSymbolType'
2019-09-30 19:24:40 +02:00
Max Brunsfeld
27149902f8
Handle is?, is-not?, and set! predicate functions in queries
2019-09-25 10:21:20 -07:00
Max Brunsfeld
b15e90bd26
Handle set! predicate function in queries
2019-09-24 11:54:24 -07:00
Max Brunsfeld
ff9a2c1f53
Make queries work in languages with simple aliases
2019-09-24 11:54:24 -07:00
Max Brunsfeld
070f11b8bf
Use ptr::NonNull in Rust bindings
2019-09-23 17:00:52 -07:00
Björn Linse
15e3bc7fd2
Fix some compiler warnings regarding function prototypes
2019-09-22 11:49:44 +02:00
Max Brunsfeld
a6b6a681ec
Fix a bug that prevented early termination of query matches
2019-09-18 16:13:10 -07:00
Max Brunsfeld
d9b8bae629
rust: Include pattern indices when iterating query captures
2019-09-18 14:22:55 -07:00
Max Brunsfeld
186b08381c
Terminate failed query matches before descending whenever possible
...
When iterating over captures, this prevents reasonable queries from
forcing the tree cursor to buffer matches unnecessarily.
2019-09-18 11:37:49 -07:00
Max Brunsfeld
374a7ac81e
Ensure that duplicate captures are ordered by pattern index
2019-09-17 16:27:16 -07:00
Max Brunsfeld
82955759c0
Add an API for getting a pattern's start offset in the source code
2019-09-17 16:19:58 -07:00