Commit graph

1910 commits

Author SHA1 Message Date
Max Brunsfeld
5b18fe672b Link to the documentation site from the README 2018-06-12 17:43:55 -07:00
Max Brunsfeld
a7ffbd022f Make docs page readable on mobile 2018-06-12 17:43:55 -07:00
Max Brunsfeld
d1665da21c Add docs 2018-06-11 19:17:10 -07:00
Max Brunsfeld
7ad50f2731 Start fleshing out docs site 2018-06-10 14:44:33 -07:00
Max Brunsfeld
fb14cb0737
Merge pull request #172 from tree-sitter/cache-parent-nodes
Cache parent nodes to speed up `ts_node_parent` in common cases
2018-05-29 17:21:24 -07:00
Max Brunsfeld
f3014cb767 Cache parent nodes to speed up ts_node_parent in common cases 2018-05-29 16:00:32 -07:00
Max Brunsfeld
f0e557fa78
Merge pull request #163 from tree-sitter/loosen-keyword-capture-token-criteria
Loosen keyword capture token criteria
2018-05-25 21:51:28 -07:00
Max Brunsfeld
8120e61d8d Remove blank lines from log messages 2018-05-25 21:37:25 -07:00
Max Brunsfeld
45c52f9459 Allow keywords to contain numbers, as long as they start w/ a letter 2018-05-25 21:28:47 -07:00
Max Brunsfeld
356d5e0221 Generalize logic for finding a keyword capture token 2018-05-25 15:29:15 -07:00
Max Brunsfeld
b050460f58
Merge pull request #171 from tree-sitter/log-during-generate
Set up infrastructure for logging during parser generation
2018-05-24 16:47:58 -07:00
Max Brunsfeld
406a85a166 Log when lexical conflicts prevents parse state merging 2018-05-24 16:46:43 -07:00
Max Brunsfeld
915978aa9d Avoid redundant logging of conflicting tokens 2018-05-24 16:22:16 -07:00
Max Brunsfeld
6fca8f2f4d Make ts_compile_grammar take an optional log file, start logging to it 2018-05-24 16:01:14 -07:00
Max Brunsfeld
69d8c6f5e6 Check that language is present in both parse() and resume() 2018-05-23 15:41:16 -07:00
Max Brunsfeld
986ceefc81
Merge pull request #170 from tree-sitter/pausing-and-resuming
Add APIs for pausing a parse after N operations and resuming later
2018-05-23 15:20:53 -07:00
Max Brunsfeld
e16f0338d6 Add APIs for pausing a parse after N operations and resuming later 2018-05-23 15:02:39 -07:00
Max Brunsfeld
babb8261a3 Extract an iterator from TreeCursor methods 2018-05-22 14:43:21 -07:00
Max Brunsfeld
c0763c69c4 Fix handling of aliases in TreeCursor 2018-05-22 14:43:21 -07:00
Max Brunsfeld
5cb4b953e5
Merge pull request #169 from tree-sitter/fuzz-driver
Update fuzzer to new API
2018-05-22 09:46:18 -07:00
Phil Turnbull
d7bea0a6f6 Remove unused logger 2018-05-22 09:20:53 -07:00
Phil Turnbull
8f31a5f02a Remove unused import 2018-05-22 09:01:59 -07:00
Max Brunsfeld
80630ce504 Store nodes' public-facing positions, not pre-padding positions 2018-05-22 08:50:04 -07:00
Phil Turnbull
c41841f4e9 Assert ts_parser_set_language in fuzz driver 2018-05-22 08:40:36 -07:00
Phil Turnbull
c56c4affb2 Use ts_tree_root_node in fuzz driver 2018-05-22 08:19:56 -07:00
Max Brunsfeld
8d57ce9cdf
Merge pull request #167 from tree-sitter/cancellation
Add an API for cancelling the current parse
2018-05-21 17:43:31 -07:00
Max Brunsfeld
1fece241aa Add ts_parser_set_enabled API 2018-05-21 17:28:12 -07:00
Max Brunsfeld
7f3ea52acf
Merge pull request #168 from tree-sitter/simplify-node-reuse
Don't reuse nodes within ambiguities
2018-05-21 16:30:12 -07:00
Max Brunsfeld
39c3de3fc8 Don't reuse nodes within ambiguities 2018-05-21 16:04:10 -07:00
Max Brunsfeld
95fbc23fd6 Add support for running focused tests via windows test script 2018-05-21 14:09:42 -07:00
Max Brunsfeld
78f28b14ce Remove unused field 2018-05-18 14:27:52 -07:00
Max Brunsfeld
9c1e82a7ea ⬆️ utf8proc, use new UTF8PROC_STATIC macro 2018-05-18 10:25:55 -07:00
Max Brunsfeld
3c01382b95 Avoid warnings about repeated typedefs 2018-05-17 17:59:50 -07:00
Max Brunsfeld
5ec3769cb4 Make ts_tree_cursor_current_node take the cursor as const 2018-05-17 14:24:32 -07:00
Max Brunsfeld
074c051094 Change the TSInputEdit struct to work with old/new start and end positions 2018-05-17 11:14:51 -07:00
Max Brunsfeld
95be6e3bee Make it clear which field of TSNode can be used as a unique id 2018-05-16 16:20:33 -07:00
Max Brunsfeld
e3670be42f Avoid one heap allocation when instantiating a TSTreeCursor 2018-05-16 16:05:08 -07:00
Max Brunsfeld
6fc8d9871c Hide the details of TSNode's fields in the public API 2018-05-16 15:44:04 -07:00
Max Brunsfeld
ebddb1a0b5 Add ts_tree_cursor_goto_first_child_for_byte method
Atom needs this for efficiently seeking to the leaf node at a given position,
visiting all of its ancestors along the way.
2018-05-16 13:51:21 -07:00
Max Brunsfeld
89b3a6a059
Merge pull request #165 from tree-sitter/no-parent-pointers
Remove all use of mutable state in syntax trees
2018-05-11 17:33:36 -07:00
Max Brunsfeld
b2c5741ded Link tests against libpthread on linux 2018-05-11 17:19:16 -07:00
Max Brunsfeld
32c06b9b59 Make multi-threaded test work on windows
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 17:10:05 -07:00
Max Brunsfeld
043a2fc0d9 Assert absence of memory leaks in randomized multi-threaded tree test 2018-05-11 16:53:47 -07:00
Max Brunsfeld
a3e08e7c31 Add randomized multi-threaded tests on parse trees
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 16:10:36 -07:00
Max Brunsfeld
fe53506175 Declare subtrees as const wherever possible
Co-Authored-By: Rick Winfrey <rewinfrey@github.com>
2018-05-11 15:06:13 -07:00
Max Brunsfeld
6bb63f549f Fix unused lambda captures 2018-05-11 14:59:59 -07:00
Max Brunsfeld
20c183b7cd Rename ts_subtree_make_* -> ts_subtree_new_* 2018-05-11 13:02:12 -07:00
Max Brunsfeld
bf1bb1604f Rename TSExternalTokenState -> ExternalScannerState 2018-05-11 12:57:41 -07:00
Max Brunsfeld
f0c7295d27 Update fuzz driver to use new API 2018-05-11 12:48:51 -07:00
Max Brunsfeld
cd55d5275d Update the readme to reflect the new API 2018-05-11 12:48:51 -07:00