Max Brunsfeld
9ac496aced
Merge pull request #232 from bfredl/allsymbols
...
runtime: make ts_language_symbol_for_name work for alias symbols
2018-11-16 09:23:02 -08:00
Max Brunsfeld
714a45c71b
Fix error in lookahead_bytes calculation
...
This caused word tokens to have lookahead byte values that were
way too large, making ts_subtree_edit very expensive.
2018-11-14 11:30:34 -08:00
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
47918070f6
Add a single-source file way of building the runtime library
2018-11-13 15:36:21 -08:00
Björn Linse
ca24942929
runtime: make ts_language_symbol_for_name work for alias symbols
2018-11-13 11:35:38 +01: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
361fd6ecea
Add guard to prevent infinite loops in error recovery
2018-11-08 11:29:21 -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
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
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
1129759b52
Don't include null index in property table json
2018-10-03 21:38:19 -07:00
Max Brunsfeld
e65403930f
Add ts_compile_property_sheet API
2018-10-03 18:12:51 -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
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
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
78b54810a6
Disable optimizations on windows for parsers w/ large lex functions
2018-09-12 15:01:56 -07:00
Max Brunsfeld
508499bab1
Fix bug where missing token was inserted outside of any included range
2018-09-11 17:41:23 -07:00
Max Brunsfeld
edbdf4b802
Increase maximum pre-allocation size of external scanner state
2018-08-31 13:30:59 -07:00
Max Brunsfeld
234d020957
Fix invalid access of external_scanner_state on non-terminal subtree
...
Fixes #199
2018-08-31 10:48:46 -07:00
Max Brunsfeld
77e4caef4f
Revert "Store trees' children in TreeArrays, not w/ separate pointer and length"
...
This reverts commit 09be0b6ef5 .
2018-08-31 10:41:06 -07:00
Max Brunsfeld
69c815107f
Make ts_language_symbol_for_name work for ERROR
2018-08-31 09:46:55 -07:00
Max Brunsfeld
068c9841a1
Fix bug in ts_node_prev_sibling w/ empty nodes
2018-08-30 20:19:26 -07:00
Max Brunsfeld
e56d17a806
Fix symbol type for simple anonymous aliases
2018-08-30 12:40:27 -07:00
Max Brunsfeld
0fe6496b8b
Allow version count to temporarily exceed the max during reductions
2018-08-30 10:43:01 -07:00
Max Brunsfeld
7fc64ed25a
Account for simple aliases in unit reduction elimination
2018-08-30 09:57:22 -07:00
Max Brunsfeld
5372a81947
Simplify treatment of rules that are always aliased one way
2018-08-30 09:57:22 -07:00
Max Brunsfeld
725314b19e
Fix bugs that prevented dynamic precedence from being respected
2018-08-23 16:45:36 -07:00
Max Brunsfeld
d4264d6191
Fix parsing of quantifiers with no upper bound
2018-08-06 13:47:26 -07:00
Max Brunsfeld
acc937b7d7
Handle input chunks that end within multi-byte characters
2018-08-02 15:43:30 -07:00
Max Brunsfeld
126f84aa73
Avoid unnecessary suffixes on external symbol identifiers
2018-08-01 16:11:21 -07:00
Max Brunsfeld
cb784975a4
Add IMMEDIATE_TOKEN rule type, for enforcing no preceding extras
2018-08-01 14:00:57 -07:00
Max Brunsfeld
e88dd223b2
Support {} quantifier syntax in regexes
2018-07-25 11:29:41 -07:00
Max Brunsfeld
87c992a7f0
Add lexer API for detecting boundaries of included ranges
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-07-17 13:58:26 -07:00