Max Brunsfeld
23837adac1
Fix editing documentation, add note about ts_node_edit
...
Fixes #242
2018-11-27 11:31:22 -08:00
Zach Waugh
2be55244fc
Add parse function that accepts input encoding
2018-11-21 15:55:24 -05:00
Max Brunsfeld
8fdcf84ff3
0.3.2
2018-11-20 16:00:45 -08:00
Max Brunsfeld
afe7223582
Upgrade Tree-sitter, use single source file in build script
2018-11-20 15:56:16 -08:00
Max Brunsfeld
30258c843e
Merge pull request #234 from mpsijm/patch-1
...
Remove `-s` option from `which` in test script
2018-11-20 14:04:39 -08:00
mpsijm
e0bcb27943
Pipe output of which (hash) to /dev/null
2018-11-20 22:52:44 +01:00
Max Brunsfeld
6b8e5bd1f9
Add code to handle failure case with unknown repro steps
2018-11-20 12:05:20 -08:00
mpsijm
01fef6d81f
Remove -s option from which in test script
...
When I tried running the tests with a debugger, the script failed with the following message:
Illegal option -s
Usage: /usr/bin/which [-a] args
Illegal option -s
Usage: /usr/bin/which [-a] args
No debugger found
In case this `-s` flag is needed for other OSes than Linux (I'm working with Ubuntu 18.04), this could be based on a `uname` check (like on line 44).
2018-11-20 10:33:48 +01:00
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
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
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
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
db360b73fb
Add Tree.walk_with_properties
2018-10-13 14:27:17 -07:00
Max Brunsfeld
a8cbde6dbf
Run rustfmt on lib.rs
2018-10-09 08:23:02 -07:00
Max Brunsfeld
91d35dec7d
Add Parser.parser_utf8_io() method
2018-10-08 22:33:43 -07:00
Max Brunsfeld
572e8c202e
Implement Send for Parser
2018-10-08 22:33:11 -07:00
Max Brunsfeld
0c2e1c189b
Implement Clone for Language
2018-10-08 22:32:58 -07:00
Max Brunsfeld
c8125ec617
Make Language send + sync, add language methods
2018-10-08 11:45:57 -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