Commit graph

3103 commits

Author SHA1 Message Date
Max Brunsfeld
143588c148 Implement ItemSetBuilder 2018-12-18 17:31:54 -08:00
Max Brunsfeld
889f232b4c Implement variable inlining 2018-12-18 16:05:36 -08:00
Max Brunsfeld
7bd9eaa970 0.3.5 2018-12-13 16:43:44 -08:00
Max Brunsfeld
d79203f58c Add test script 2018-12-13 16:42:46 -08:00
Max Brunsfeld
3f1fc65a27 Auto-format lib.rs 2018-12-13 16:32:22 -08:00
Max Brunsfeld
6d3835d292 Add Node::children method 2018-12-13 16:32:10 -08:00
Max Brunsfeld
bdd3f20522 Add PropertySheet::map method 2018-12-13 16:30:40 -08:00
Max Brunsfeld
4a361fbb3f Implement Copy for Node 2018-12-13 10:08:50 -08:00
Max Brunsfeld
494329c93b Add Parser.set_included_ranges and Node.range 2018-12-13 10:08:25 -08:00
Max Brunsfeld
5fa586f7c9 Format expand_tokens file 2018-12-12 21:01:41 -08:00
Max Brunsfeld
842421633c Fix bugs in nfa generation 2018-12-12 20:58:26 -08:00
Max Brunsfeld
0103a83f3f Integrate separator rules into lexer nfa 2018-12-12 18:04:29 -08:00
Max Brunsfeld
40d24097ec Implement extract_simple_aliases 2018-12-12 16:41:32 -08:00
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