Max Brunsfeld
80cab8fd8a
Make the empty chunk 2 bytes long, for UTF16 support
2018-06-25 17:46:23 -07:00
Max Brunsfeld
4f5a87b952
Merge pull request #181 from tree-sitter/new-apis
...
Add some APIs
2018-06-24 15:48:24 -07:00
Max Brunsfeld
10c12aaa3b
Add ts_language_symbol_for_name function
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:32 -07:00
Max Brunsfeld
fae7460541
Add ts_tree_language function
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:19 -07:00
Max Brunsfeld
89b6a14d9f
Allow creating a tree cursor starting at any node, not just the root
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:54:04 -07:00
Max Brunsfeld
35ed21139c
Declare the tree field of TSNode with a type of TSTree
...
This field doesn't need to be treated as opaque.
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-21 12:53:17 -07:00
Max Brunsfeld
7f44e8099e
Merge pull request #180 from tree-sitter/included-ranges
...
Add an API for parsing selected ranges of a document
2018-06-20 14:56:51 -07:00
Max Brunsfeld
a6451f9b4f
Add ts_parser_set_include_ranges function
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-20 13:37:43 -07:00
Max Brunsfeld
6632cb3d5c
Include byte offsets in TSRange
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-20 11:46:44 -07:00
Max Brunsfeld
be81989de2
Improve implementation page of docs
2018-06-20 09:49:23 -07:00
Max Brunsfeld
34de822738
Re-enable subtree object pool after accidentally disabling it
2018-06-19 16:33:33 -07:00
Max Brunsfeld
26ab57a656
Merge pull request #179 from tree-sitter/reset-instead-of-resume
...
Remove `resume` method and make the main `parse` method resume by default
2018-06-19 15:47:25 -07:00
Max Brunsfeld
d7c1f84d7b
Remove resume method, make parse resume by default
...
Also, add a `reset` method to explicitly discard an outstanding parse.
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-19 15:33:29 -07:00
Max Brunsfeld
a24f7764d8
Get rid of string_input source file
...
There's not much in there now.
2018-06-19 11:27:55 -07:00
Max Brunsfeld
196d7f1355
Update sentence about TSInput in docs
2018-06-19 11:15:01 -07:00
Max Brunsfeld
9b05142439
Merge pull request #178 from tree-sitter/simplify-input-interface
...
Consolidate TSInput interface down to one function
2018-06-19 11:13:26 -07:00
Max Brunsfeld
b0b3b2e5f3
Consolidate TSInput interface down to one function
2018-06-19 09:34:40 -07:00
Max Brunsfeld
2a507f0739
Merge pull request #177 from tree-sitter/html-in-randomized-tests
...
Include the HTML parser in the randomized test suite, fix discovered bug
2018-06-18 11:40:37 -07:00
Max Brunsfeld
703541e838
Explicitly initialize variable in ts_tree_cursor_goto_next_sibling
2018-06-18 10:48:32 -07:00
Max Brunsfeld
71f7bf2fca
Fetch HTML grammar as a test fixture on windows too
2018-06-18 10:06:59 -07:00
Max Brunsfeld
b29c5dbf15
Rephrase ts_subtree_array_copy to avoid conspicuous null case
...
This avoids a false positive error from the clang static analyzer, which
doesn't understand the invariants of the Array type.
2018-06-15 17:07:35 -07:00
Max Brunsfeld
75cf95bddc
Fix double free when an external token is copied
2018-06-15 16:18:08 -07:00
Max Brunsfeld
b14951de9d
Included HTML parser in randomized test suite
2018-06-15 16:17:56 -07:00
Max Brunsfeld
e130c4ddb5
Add word property to grammar JSON schema
2018-06-15 13:32:41 -07:00
Max Brunsfeld
52a5e4125e
Revert "Fix another const mismatch warning"
...
This reverts commit 776230782b .
2018-06-15 13:22:37 -07:00
Max Brunsfeld
4b5dab2d18
Convert keywords back to word token at runtime if needed
2018-06-15 13:15:02 -07:00
Max Brunsfeld
0dd41f0d74
Restore logic for restricting keyword tokens
...
Removing this restriction created problems for the Rust grammar, and
possibly others. The proper fix would be to ensure that the 'word
token' matches *every* possible string that a 'keyword token'
matches, as opposed to just matching *some* of the same strings.
This would require us to gather a little more information
about how tokens conflict. For now, I'm just going to put back the
hard-coded logic that we had.
2018-06-15 13:15:02 -07:00
Max Brunsfeld
c39f0e9ef9
Rename word_rule -> word_token
2018-06-15 09:15:12 -07:00
Max Brunsfeld
2a2e5032d4
Fix links in docs
2018-06-14 15:27:28 -07:00
Max Brunsfeld
245052442a
Merge pull request #176 from tree-sitter/explicit-word-token
...
Perform keyword optimization using explicitly selected word token
2018-06-14 13:19:11 -07:00
Max Brunsfeld
f42cb877f3
Improve docs for lexing, keyword handling
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-14 13:18:48 -07:00
Max Brunsfeld
776230782b
Fix another const mismatch warning
2018-06-14 12:38:52 -07:00
Max Brunsfeld
91e3bc3e55
Update parse state merging logic for explicit word tokens
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-14 12:32:27 -07:00
Max Brunsfeld
30b0d1c833
Fix const/non-const mismatch in array_splice function
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-14 12:03:59 -07:00
Max Brunsfeld
190456d7ec
Fix logging during lex table construction
...
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-14 12:03:40 -07:00
Max Brunsfeld
6e72c2943d
Avoid missing field initializer warnings w/o default field syntax
...
The default field syntax aint working on windows
2018-06-14 11:12:04 -07:00
Max Brunsfeld
587d1a740a
Docs - give motivation and code example for keyword optimization
2018-06-14 10:29:03 -07:00
Max Brunsfeld
121dd15bda
Docs - don't create TOC entries for h4 headers
2018-06-14 10:27:31 -07:00
Max Brunsfeld
e17cd42e47
Perform keyword optimization using explicitly selected word token
...
rather than trying to infer the word token automatically.
Co-Authored-By: Ashi Krishnan <queerviolet@github.com>
2018-06-14 09:35:54 -07:00
Max Brunsfeld
0e487011c0
Add agda parser to the list on the docs site 🙇 @banacorn
2018-06-13 10:03:22 -07:00
Max Brunsfeld
d452425310
Merge pull request #157 from Pike/doc-extras-default
...
make default extras explicit in docs
2018-06-13 09:45:11 -07:00
Max Brunsfeld
0895ca237d
Merge branch 'master' into pike-doc-extras-default
2018-06-13 09:42:22 -07:00
Max Brunsfeld
0aef70028a
Dismiss docs sidebar when scrolling left on mobile
2018-06-12 19:59:30 -07:00
Max Brunsfeld
9eab5a29d9
Make docs hamburger button partially transparent
2018-06-12 18:06:07 -07:00
Max Brunsfeld
3a631616c0
Include project name in all docs page titles
2018-06-12 18:03:54 -07:00
Max Brunsfeld
10dcf050d6
Tweak docs styling, add serve-docs script
2018-06-12 17:58:38 -07:00
Max Brunsfeld
5b18fe672b
Link to the documentation site from the README
2018-06-12 17:43:55 -07:00
Max Brunsfeld
a7ffbd022f
Make docs page readable on mobile
2018-06-12 17:43:55 -07:00
Max Brunsfeld
d1665da21c
Add docs
2018-06-11 19:17:10 -07:00
Max Brunsfeld
7ad50f2731
Start fleshing out docs site
2018-06-10 14:44:33 -07:00