Max Brunsfeld
fd39568823
Apply msvs platform fix for both compiler and runtime targets
2018-12-12 15:57:11 -08:00
Max Brunsfeld
85347541f1
Allow PropertySheet selectors to match the root node
...
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2018-12-11 17:30:12 -08:00
Max Brunsfeld
4055a29aa9
Fix handling of quotes and backslashes in property sheet values
2018-12-11 13:48:28 -08:00
Max Brunsfeld
7acfb2b74e
Implement flatten_grammar
2018-12-11 12:14:34 -08:00
Max Brunsfeld
ba9da0a9b4
0.3.4
2018-12-11 10:35:03 -08:00
Max Brunsfeld
b0a7c854a4
Avoid redundant regex complication when instantiating PropertySheets
2018-12-10 14:57:46 -08:00
Max Brunsfeld
d482894c7d
Implement expand_tokens
2018-12-08 23:35:48 -08:00
Max Brunsfeld
ead6ca1738
Generate NFAs from regexes
2018-12-08 13:44:11 -08:00
Max Brunsfeld
e343c83446
Include cassert
2018-12-07 13:09:07 -08:00
Max Brunsfeld
940e5d8fbe
Fix mapping of repeat rules to their parent in conflict resolution
...
Co-Authored-By: Josh Vera <vera@github.com>
2018-12-07 12:44:51 -08:00
Max Brunsfeld
0688a5edd3
Implement extract_tokens
2018-12-06 22:11:52 -08:00
Max Brunsfeld
a4c4b85a16
Initial commit
2018-12-05 16:19:21 -08:00
Max Brunsfeld
beb60194d1
0.3.3
2018-12-03 14:42:25 -08:00
Max Brunsfeld
fbb220f193
Add test for regexes in property sheets
2018-12-03 10:43:58 -08:00
Max Brunsfeld
741fb3c5a1
Fix test now that JSON grammar has slightly changed
2018-12-01 21:26:34 -08:00
Max Brunsfeld
41df6d94b7
Allow Result to be constructed with an l-value
...
This fixes compile errors on old C++ compilers
2018-12-01 21:09:48 -08:00
Max Brunsfeld
11610e1df6
Eliminate deserializer lifetime on PropertySheet
...
The PropertySheet is intended to be a long-lived object, whereas its
JSON source is not needed once the property sheet is instantiated.
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2018-11-29 20:59:47 -08:00
Max Brunsfeld
c9ce314695
Make PropertySheet generic on the properties type
...
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2018-11-29 16:21:01 -08:00
Max Brunsfeld
d5b53cde7d
Respect the :text pseudo-class in TreePropertyCursor
...
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2018-11-28 17:26:48 -08:00
Max Brunsfeld
a741265ead
Replace all u32s in the API with usizes
...
Co-Authored-By: Timothy Clem <timothy.clem@gmail.com>
2018-11-28 17:26:16 -08:00
Max Brunsfeld
6d97cbd2b6
Merge pull request #236 from zachwaugh/add-parse-encoding-param
...
Enable direct parsing of UTF-16 strings
2018-11-27 16:44:58 -08:00
Zach Waugh
99c451818d
Use char * instead of void * for all parse string inputs
2018-11-27 15:43:21 -05:00
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