Max Brunsfeld
d853b6504d
Add version number to TSLanguage structs
2017-01-31 10:21:47 -08:00
Max Brunsfeld
36608180d2
Store external token states in the parse stack
2017-01-08 22:06:05 -08:00
Max Brunsfeld
3a4daace26
Move reusable node functions to their own file
2017-01-05 10:07:27 -08:00
Max Brunsfeld
12cd2132ff
Add test for retrieving last external token state in a Tree
2017-01-04 21:23:04 -08:00
Max Brunsfeld
d57043b665
Add ability to store external token state per stack version
2017-01-04 21:22:23 -08:00
Max Brunsfeld
adae1b16a6
Remove shared setup in tree spec
2016-12-26 14:39:41 -08:00
Max Brunsfeld
b833942bb8
Clean up Document spec
2016-12-21 11:42:32 -08:00
Max Brunsfeld
83c4c03a70
Remove unnecessary describes in Parser spec
2016-12-21 11:38:25 -08:00
Max Brunsfeld
75bcfed247
Rename doc variable -> document in Parser spec
2016-12-21 11:32:27 -08:00
Max Brunsfeld
4fd7b0e55d
Remove nested before_each's in Parser spec
2016-12-21 11:31:28 -08:00
Max Brunsfeld
e6c82ead2c
Start work toward maintaining external scanner's state during incremental parses
2016-12-20 17:06:20 -08:00
Max Brunsfeld
727727623a
Start work on unit test that edits python code
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-12-20 13:10:18 -08:00
Max Brunsfeld
0e595346be
Make lexer log output easier to read
2016-12-09 13:33:37 -08:00
Max Brunsfeld
e7217f1bac
Clean up some methods in parser.c
2016-11-14 17:25:55 -08:00
Max Brunsfeld
535879a2bd
Represent byte, char and tree counts as 32 bit numbers
...
The parser spends the majority of its time allocating and freeing trees and stack nodes.
Also, the memory footprint of the AST is a significant concern when using tree-sitter
with large files. This library is already unlikely to work very well with source files
larger than 4GB, so representing rows, columns, byte lengths and child indices as
unsigned 32 bit integers seems like the right choice.
2016-11-14 12:19:13 -08:00
Max Brunsfeld
fad7294ba4
Store shift states for non-terminals directly in the main parse table
2016-11-14 08:36:06 -08:00
Max Brunsfeld
c9dcb29c6f
Remove the TS prefix from some internal type/function names
2016-11-09 20:59:05 -08:00
Max Brunsfeld
4106ecda43
Remove logic for recovering from OOM
2016-11-04 09:18:38 -07:00
Max Brunsfeld
eed54d95e1
Merge branch 'master' into changed-ranges
2016-10-16 21:10:25 -07:00
Max Brunsfeld
4bad58b407
Remove outdated test
2016-10-16 14:54:59 -07:00
Max Brunsfeld
b3140b2689
Implement ts_document_parse_and_get_changed_ranges
2016-10-15 22:31:21 -07:00
Max Brunsfeld
6bde4c54d9
Merge pull request #40 from tree-sitter/remove-runtime-dep-from-parser-header
...
Remove generated parsers' dependency on runtime.h
2016-10-05 14:13:53 -07:00
Max Brunsfeld
e149d94ff5
Remove generated parsers' dependency on runtime.h
2016-10-05 14:02:49 -07:00
Timothy Clem
0ffebc3d0c
s/TSDebugger/TSLogger in spec name
2016-10-05 08:48:12 -07:00
Max Brunsfeld
3014101104
Fix inconsistencies in nodes sizes after edits
2016-09-19 13:35:08 -07:00
Max Brunsfeld
00528e50ce
Change edit API to be byte-based
2016-09-13 13:08:52 -07:00
Max Brunsfeld
cc62fe0375
Represent Lengths in terms of Points
2016-09-09 21:11:02 -07:00
Max Brunsfeld
591fcc980c
Update trees' offsets when editing them
2016-09-08 17:54:51 -07:00
Max Brunsfeld
131bbee160
Rename parse_and_diff -> parse_and_get_changed_ranges
...
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-08 17:51:34 -07:00
Max Brunsfeld
fce8d57152
Start work on document_parse_and_diff API
2016-09-08 17:51:20 -07:00
Max Brunsfeld
a6a08dde31
Rename ts_node_name -> ts_node_type
2016-09-06 21:43:59 -07:00
Max Brunsfeld
38241d466b
Rename .read_fn, .seek_fn -> .read, .seek
2016-09-06 21:39:10 -07:00
Max Brunsfeld
f6da44fdbb
Add ts_node_descendant_for_byte_range
2016-09-06 21:33:19 -07:00
Max Brunsfeld
70756034f1
Allow descendant queries by both 1D and 2D coordinates
2016-09-06 21:17:26 -07:00
Max Brunsfeld
096ac2d4b6
Rename ts_document_set_debugger -> ts_document_set_logger
2016-09-06 17:40:26 -07:00
Max Brunsfeld
64a6c9db0e
Rename ts_document_make -> ts_document_new
2016-09-06 17:26:18 -07:00
Max Brunsfeld
1c52c30111
Fix unexpected EOF errors getting lost
2016-09-03 22:46:14 -07:00
Max Brunsfeld
b6e2bed761
Fix specs after js grammar change
2016-09-01 17:45:35 -07:00
Max Brunsfeld
7483da4184
Add push_count to stack, use it in error comparisons
2016-08-31 17:29:14 -07:00
Max Brunsfeld
1d617ab5e0
Allow reductions based on error token, skipping some preceding content
2016-08-29 17:34:51 -07:00
Max Brunsfeld
e947d7e2ad
Adjust test assertions for subtly different recoveries
2016-08-29 11:23:52 -07:00
Max Brunsfeld
87ca3cb099
Reuse nodes based on state matching, not sentential form validity
...
I think that state matching is the only correct strategy for incremental
node reuse that is compatible with the new error recovery algorithm. It's
also simpler than the sentential-form algorithm. With the compressed parse
tables, state matching shouldn't be too conservative of a test.
2016-07-31 21:31:19 -07:00
Max Brunsfeld
c3a242740b
Allow lookahead to be broken down further after performing reductions
2016-07-04 12:20:23 -07:00
Max Brunsfeld
8c26d99353
Store error recovery actions in the normal parse table
2016-06-27 14:07:47 -07:00
Max Brunsfeld
09b019c530
Fix test for invalid blank input
2016-06-23 09:24:26 -07:00
Max Brunsfeld
c6e9b32d3f
Print all the same parse log messages for both debugging methods
2016-06-22 22:36:11 -07:00
Max Brunsfeld
773e50f26b
Update error recovery specs to reflect slightly different recoveries
2016-06-18 20:46:16 -07:00
Max Brunsfeld
ecc7399ed3
Fix stack breakdown procedure when there are trailing extra tokens
2016-06-14 20:25:33 -07:00
Max Brunsfeld
00a0939504
Abort erroneous parse versions more eagerly
2016-06-02 14:04:48 -07:00
Max Brunsfeld
6535704870
Replace stack_merge_new function with two simpler functions
...
- merge(version1, version2)
- split(version)
2016-05-28 21:22:10 -07:00