Commit graph

2066 commits

Author SHA1 Message Date
Max Brunsfeld
cdbe5a5355 Fix handling of the maximum range in ts_tree_edit 2018-11-14 11:28:43 -08:00
Max Brunsfeld
434a39b805 Generalize balancing criteria to include repeat nodes w/ extra tokens
Previously, extra tokens like comments would prevent trees from being
balanced properly.
2018-11-14 10:20:36 -08:00
Max Brunsfeld
87c391f8af Use hash instead of which 2018-11-13 15:56:03 -08:00
Max Brunsfeld
62ded2aa1d Add c99 flag to build-runtime script 2018-11-13 15:46:39 -08:00
Max Brunsfeld
47918070f6 Add a single-source file way of building the runtime library 2018-11-13 15:36:21 -08:00
Max Brunsfeld
5e456ccbb0
Merge pull request #230 from tree-sitter/eof-edits
Fix incorrect node reuse for edits right at EOF
2018-11-12 13:03:08 -08:00
Max Brunsfeld
10ab7032a6 Fix incorrect node reuse for edits right at EOF 2018-11-11 21:36:31 -08:00
Max Brunsfeld
392e8ea749 Fix loophole in error recovery infinite loop guard 2018-11-08 12:47:49 -08:00
Max Brunsfeld
afeee894dc Fix handling of syntax changes in ranges that were excluded but are now included
Refs atom/atom#18342
2018-11-08 12:16:40 -08:00
Max Brunsfeld
b9217c8e4c
Merge pull request #226 from tree-sitter/infinite-loop-guard
Add guard to prevent infinite loops in error recovery
2018-11-08 11:58:01 -08:00
Max Brunsfeld
361fd6ecea Add guard to prevent infinite loops in error recovery 2018-11-08 11:29:21 -08:00
Max Brunsfeld
0f887429ae
Merge pull request #225 from tree-sitter/included-range-changes
Handle changes to the included ranges set when re-parsing after an edit
2018-11-08 09:58:42 -08:00
Max Brunsfeld
53b6b5a3c6 Partly restore more strict tree balancing criteria 2018-11-07 15:51:44 -08:00
Max Brunsfeld
1b482f0785 Reorder TSTreeCursor fields so it has the same structure as internal TreeCursor 2018-11-07 15:11:21 -08:00
Max Brunsfeld
0e3d9c2c58 Handle changes in included ranges when parsing incrementally 2018-11-07 15:10:24 -08:00
Max Brunsfeld
93a7395c19 Fix invalid dot syntax when token names contain quotes or newlines 2018-11-04 15:25:30 -08:00
Max Brunsfeld
5dbd15f5f2 Loosen criteria for when to increment repeat depth
Sometimes, an internal repeat node may have children that are
not themselves repeat nodes, because of unit reduction elimination.
This happened with the embedded template parser.
2018-11-03 23:19:31 -07:00
Max Brunsfeld
24d1e7ec7e Included embedded-template parser in randomized tests 2018-11-03 23:18:24 -07:00
Max Brunsfeld
2169c45da9 Store subtree's lookahead byte count relative to its end offset
This improves test coverage for incremental parsing by generalizing
the randomized tests in `real_grammars.cc` to make *multiple* edits
before incrementally re-parsing.
2018-11-02 15:23:38 -07:00
Max Brunsfeld
67a9cb3336 Use pointer address as node id in ts_subtree_print_dot_graph 2018-11-02 15:23:38 -07:00
Max Brunsfeld
3faaec3317
Merge pull request #217 from Turbo87/patch-1
docs: Add missing `)` to test code
2018-11-02 08:41:45 -07:00
Tobias Bieniek
1602e9f06a
docs: Add missing ) to test code 2018-11-02 14:33:12 +01:00
Max Brunsfeld
dc6d659fcf
Add CSS parser to the list in the docs 2018-10-30 09:36:45 -07:00
Max Brunsfeld
8f526e6c98
Merge pull request #209 from vzvu3k6k/fix-example-code
Fix assetion of an example program
2018-10-25 09:43:44 -07:00
vzvu3k6k
87448aa534 Fix assetion of an example program
test-json-parser fails:
    test-json-parser.c:42: int main():
    Assertion `ts_node_child_count(array_node) == 4' failed.

`array_node` has five nodes: ([), (number), (,), (null), (]).
2018-10-25 02:20:10 +09:00
Max Brunsfeld
af01846fd7 Add ts_tree_cursor_reset function 2018-10-21 10:39:05 -07:00
Max Brunsfeld
fa1f4aa86a
Merge pull request #204 from tree-sitter/property-sheets
Add a system for assigning properties to syntax nodes
2018-10-15 23:18:33 -07:00
Max Brunsfeld
2b6857bb45 Fix breaking of property selector specificity ties 2018-10-15 09:41:46 -07:00
Max Brunsfeld
91fb64984f Fix order of operations in PropertyTableBuilder 2018-10-13 20:15:07 -07:00
Max Brunsfeld
277bf2f03d Add text pattern handling to property table generation 2018-10-04 15:03:17 -07:00
Max Brunsfeld
9c6f5c9836 Add comments to PropertyTableBuilder 2018-10-04 09:20:53 -07:00
Max Brunsfeld
c79929f8ea Include cstring for memcmp 2018-10-03 22:09:45 -07:00
Max Brunsfeld
0aac2ab722 ⬆️ bandit 2018-10-03 21:59:28 -07:00
Max Brunsfeld
1129759b52 Don't include null index in property table json 2018-10-03 21:38:19 -07:00
Max Brunsfeld
00a94ac040 Fix javascript error fixture 2018-10-03 21:38:03 -07:00
Max Brunsfeld
5fdbb2483d Always build 64-bit on macOS 2018-10-03 21:37:48 -07:00
Max Brunsfeld
e65403930f Add ts_compile_property_sheet API 2018-10-03 18:12:51 -07:00
Max Brunsfeld
257522372f Rename appveyor.yml -> .appveyor.yml 2018-09-21 18:28:12 -07:00
Max Brunsfeld
50cc0aa31d Add a 64-bit build on appveyor 2018-09-21 18:27:49 -07:00
Max Brunsfeld
3dab0066bc Add missing padding bytes check before storing tree inline 2018-09-19 10:52:21 -07:00
Max Brunsfeld
3672da6ac3 🎨 Use NULL_SUBTREE constant in a few more places 2018-09-17 22:24:37 -07:00
Max Brunsfeld
2408e7fec0
Merge pull request #202 from tree-sitter/stack-allocated-leaves
Allocate terminal subtrees on the stack in 64-bits when possible
2018-09-17 20:40:45 -07:00
Max Brunsfeld
b29d0f622f Cram terminal subtree data into a 64-bit integer when possible 2018-09-17 18:52:34 -07:00
Max Brunsfeld
e00c3bbdb9 Take more parameters in ts_subtree_new_leaf 2018-09-15 00:08:47 -07:00
Max Brunsfeld
c828ca308f Don't store first_leaf field on leaf nodes 2018-09-14 23:08:15 -07:00
Max Brunsfeld
637a65fee9
Merge pull request #201 from tree-sitter/reduce-memory-footprint
Use smaller allocations for normal leaf nodes
2018-09-14 13:42:58 -07:00
Max Brunsfeld
93926fc82e Don't store node_count and dynamic_precedence for leaf nodes 2018-09-14 11:02:11 -07:00
Max Brunsfeld
c7306722dd Use smaller allocations for normal leaf nodes 2018-09-14 00:48:03 -07:00
Max Brunsfeld
25797cad5f Add favicon to docs site 2018-09-12 20:29:24 -07:00
Max Brunsfeld
9e13912db3 Tweak docs for multi-language documents 2018-09-12 20:11:35 -07:00