Max Brunsfeld
af09e65efc
Move node types code to its own module
2019-03-26 14:42:32 -07:00
Max Brunsfeld
6c65d74810
Restructure node-types.json output
2019-03-26 13:43:10 -07:00
Max Brunsfeld
5035e194ff
Merge branch 'master' into node-fields
2019-03-26 11:58:21 -07:00
Max Brunsfeld
b79bd8693b
Start work on handling node supertypes
2019-03-26 11:51:02 -07:00
Max Brunsfeld
82358d3f2f
Merge pull request #307 from tree-sitter/pointer-sized-cancellation-flag
...
Make the cancellation flag a size_t, not a uint32_t
2019-03-22 12:30:39 -07:00
Max Brunsfeld
5a59f19b69
Use explicit syntax for functions with no parameters
2019-03-21 16:06:06 -07:00
Max Brunsfeld
0ccb910922
Use a size_t instead of a uint32_t for cancellation flag
2019-03-21 11:26:05 -07:00
Max Brunsfeld
2fd9ffa8e5
Add --cancel flag to parse command to allow command-line testing
2019-03-21 10:56:32 -07:00
Max Brunsfeld
3340168097
Fix backwards logic for cancellation flag
2019-03-20 17:02:07 -07:00
Max Brunsfeld
8941dc1dda
Add cancellation flag parameter to highlight API
2019-03-18 09:52:02 -07:00
Max Brunsfeld
0ae304f582
Lib: Rework the API for cancelling a parse
...
Also, use beta on CI until atomic::AtomicU32 lands in stable.
2019-03-18 09:51:21 -07:00
Jacob Mitchell
15b096d695
Extract graph log validation into a specialized test
2019-03-14 22:21:19 -07:00
Jacob Mitchell
c8d040ca26
Use 1-indexed rows in CLI and log output ( resolves #287 )
2019-03-14 22:21:19 -07:00
Max Brunsfeld
1aaad66a03
Merge pull request #301 from tree-sitter/clock-based-timeouts
...
Replace operation limit API with a clock-based timeout API
2019-03-14 16:50:44 -07:00
Max Brunsfeld
9ae594a507
Be more loose with timeout unit test assertions
2019-03-14 15:53:45 -07:00
Max Brunsfeld
006a931ab8
Tests: Prevent array reallocations during ts_stack_print_dot_graph
...
When debugging a test with 'script/test -D', the DOT-graph generation
code was sometimes causing reallocations that were not captured by the
allocation tracker, because we explicitly disable allocation-tracking
for that method in order to reduce noise when debugging memory leaks.
By growing the relevant array *prior* to turning off allocation
tracking, we can ensure that it is not reallocated within that function,
avoiding false positive memory leak errors.
Fixes #302
2019-03-14 13:59:12 -07:00
Max Brunsfeld
88e3907cc0
Use QueryPerformanceFrequency as clock on windows
2019-03-14 13:42:31 -07:00
Max Brunsfeld
e30e827c5f
CLI: Add timeout flag to parse command
2019-03-14 11:52:50 -07:00
Max Brunsfeld
cddb3e416d
Replace operation limit API with a clock-based timeout API
2019-03-14 11:13:38 -07:00
Max Brunsfeld
abcac40f2d
cli: Add a --time flag to highlight subcommand
2019-03-13 15:52:29 -07:00
Max Brunsfeld
083e813218
Highlight: fix handling of root node injections like in ERB, EJS
2019-03-13 15:51:50 -07:00
Max Brunsfeld
b89348e7fe
Merge branch 'master' into c-highlight
2019-03-12 15:27:12 -07:00
Max Brunsfeld
2de54c101e
cli: put a newline character at the end of grammar.json files
2019-03-12 11:54:31 -07:00
Max Brunsfeld
d19c875134
cli: ⬆️ rsass
2019-03-12 11:50:16 -07:00
Max Brunsfeld
98e4fd22ef
Start work on a C API for syntax highlighting
2019-03-08 13:13:02 -08:00
Max Brunsfeld
f52271352b
Merge branch 'master' into node-fields
2019-03-05 08:08:05 -08:00
Max Brunsfeld
a20fc3c111
Remove unnecessary character escape processing for regexes
...
Fixes #289
2019-03-04 10:10:04 -08:00
Max Brunsfeld
08ac66a656
Don't generate prop sheets when a specific grammar path is passed
2019-03-03 18:53:24 -08:00
Max Brunsfeld
363079bf3e
Re-enable HTML language in benchmarks
...
Made possible by this error recovery performance fix:
4c7d5fe26c
2019-03-03 18:23:01 -08:00
Max Brunsfeld
4e059e18cb
0.14.5
2019-02-25 12:55:28 -08:00
Max Brunsfeld
1bad6dc41e
Add ~/.tree-sitter/config.json file, init-config command
...
Right now this is just used for two things:
* Specifying folders for locarting parsers to use with `tree-sitter
parse` and `tree-sitter highlight`
* Specifying colors to use for `tree-sitter-highlight`
2019-02-25 12:33:24 -08:00
Max Brunsfeld
858b4ba8ac
cli: Fix handling of import chains in property sheets
2019-02-22 16:15:36 -08:00
Max Brunsfeld
14b7af3436
highlight: Fix HTML rendering of empty lines
2019-02-22 11:48:29 -08:00
Max Brunsfeld
e239aa8229
highlight: don't include scope in ScopeEnd events
...
When there are embedded documents, multiple scopes can start or
end at the same position. Previously, there was no guarantee that
the ScopeEnd events would always occur in the reverse order of the
ScopeStart events. The easiest way to avoid exposing inconsistency
is to not surface the scopes being ended.
2019-02-20 16:45:51 -08:00
Max Brunsfeld
d2264d597f
cli: Add --scope flag to highlight command
2019-02-20 14:38:19 -08:00
Max Brunsfeld
2ee5cbbc1d
highlight: take callback parameters by value
2019-02-20 10:27:08 -08:00
Max Brunsfeld
a46515b80f
Replace LanguageRegistry trait with a simple callback
2019-02-19 17:07:12 -08:00
Max Brunsfeld
e89b6b2402
Add a highlight subcommand
2019-02-19 12:32:03 -08:00
Max Brunsfeld
0dd15e2b02
Ensure deterministic order of values in property sheet JSON files
2019-02-19 10:40:34 -08:00
Max Brunsfeld
9185f6c168
Clarify parse command error message when failing to read source file
2019-02-19 10:40:27 -08:00
Max Brunsfeld
4db132ff94
In property sheets, avoid converting numeric values to strings
2019-02-15 20:48:36 -08:00
Max Brunsfeld
405c200786
Merge branch 'master' into node-fields
2019-02-14 16:27:22 -08:00
Max Brunsfeld
5debf3cbcc
cli: Create src directory before writing grammar.json
...
Fixes #278
2019-02-14 10:57:33 -08:00
Max Brunsfeld
4f069fbe3b
Merge branch 'master' into node-fields
2019-02-14 09:35:47 -08:00
Max Brunsfeld
b08f8dc855
0.14.4
2019-02-13 19:32:39 -08:00
Max Brunsfeld
57c528b6c5
CLI: Determine language symbol from grammar, not package.json
...
Fixes #272
Fixes #277
2019-02-13 19:31:26 -08:00
Max Brunsfeld
9f3134dace
Allow fields to be used in property sheets
2019-02-13 19:14:33 -08:00
Max Brunsfeld
65d1ce8593
lib: Include fields in ts_node_string output
...
This allows you to assert about fields in tests. But if your test
s-expression does *not* include fields, the fields will be stripped from
the regexp before comparison.
2019-02-13 09:47:21 -08:00
Max Brunsfeld
9f608435ee
Fix errors in when languages have no fields
2019-02-12 17:20:12 -08:00
Max Brunsfeld
56309a1c28
Generate node-fields.json file
2019-02-12 11:06:18 -08:00