Commit graph

89 commits

Author SHA1 Message Date
Max Brunsfeld
7a511f82ac
Merge pull request #331 from tree-sitter/track-locals-for-highlighting
In syntax-highlighting library, add support for tracking local variables
2019-05-10 12:28:43 -07:00
Max Brunsfeld
0d70b485c0 Implement Wasm binding for Tree.getChangedRanges() 2019-05-09 23:52:57 -07:00
Max Brunsfeld
a7d02e7276 Add support for highlight properties that track local variables 2019-05-09 20:34:34 -07:00
Max Brunsfeld
31c2086273 🎨 Refactor TreePropertyCursor 2019-05-09 09:40:15 -07:00
Max Brunsfeld
9fc058656c In binding_web, use prepublishOnly, not prepublish 2019-05-07 13:24:29 -07:00
Max Brunsfeld
9a82bd9d83 Set up code to publish web bindings to npm 2019-05-07 13:11:04 -07:00
Max Brunsfeld
572f290ec0 Fix highlighting in the presence of node fields 2019-05-07 11:17:34 -07:00
Max Brunsfeld
3fc459a84b Reorganize language bindings
* Move rust binding: lib/binding -> lib/binding_rust
* Move wasm bindinig: lib/web -> lib/binding_web
* Add wasm readme
2019-05-07 10:41:49 -07:00
Max Brunsfeld
a6a50a6320 Avoid some bloat in wasm build 2019-05-01 12:44:58 -07:00
Max Brunsfeld
73e4db41b0 Render syntax tree efficiently in docs playground 2019-04-30 11:55:30 -07:00
Max Brunsfeld
3425b6e1c2 Add wasm binding for TreeCursor 2019-04-29 13:20:09 -07:00
Max Brunsfeld
f3ecafe13b Fix inclusion of libc++ in wasm build 2019-04-27 18:06:34 -07:00
Max Brunsfeld
b4c4dc48ff Minify JS build with terser 2019-04-26 19:52:01 -07:00
Max Brunsfeld
48743dda44 Get remaining wasm tests passing 2019-04-26 17:28:15 -07:00
Max Brunsfeld
66e006105c Build and test wasm on CI 2019-04-26 14:38:13 -07:00
Max Brunsfeld
58e1a0fee7 In node range queries, treat the end coordinate as exclusive 2019-04-26 13:36:28 -07:00
Max Brunsfeld
1fc0525940 Start work on a WASM binding 2019-04-25 17:27:39 -07:00
Max Brunsfeld
bc5e71bcc2 Fix handling of zero-width external tokens at beginning of document
Fixes #316
2019-04-08 15:01:52 -07:00
Max Brunsfeld
f30485f9f4 Fix accidentally-removed functions in api.h 2019-03-29 23:05:02 -07:00
Max Brunsfeld
00968db983 Add documentation to api.h
Fixes #166
2019-03-29 16:50:05 -07:00
Max Brunsfeld
5035e194ff Merge branch 'master' into node-fields 2019-03-26 11:58:21 -07:00
Marijn Haverbeke
fe5aa46d8d Swap two incorrectly placed comments 2019-03-26 16:53:35 +01: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
74d154c706 Use CLOCK_MONOTONIC on platforms that support it
This way, timeouts will apply even if the current process
is starved for CPU.
2019-03-21 14:13:42 -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
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
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
23dfde067e Get disabled debugging code compiling again
Fixes #303
2019-03-14 16:50:10 -07:00
Max Brunsfeld
59fd8528d4 Avoid division rounding errors w/ clock counts 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
430f8874ea Lib: reduce frequency of clock calls during parsing 2019-03-14 11:52:25 -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
db953312b8
Merge pull request #295 from joshuawarner32/fix-warning
Fix warning about undefined snprintf
2019-03-10 11:38:22 -07:00
Joshua Warner
6f71b8840b Fix warning about undefined snprintf 2019-03-08 21:22:13 -08:00
Joshua Warner
14a483f4c3 Simplify lifetimes in Node::children in the rust bindings 2019-03-08 20:56:24 -08:00
Max Brunsfeld
445dfda53e binding: Restore handling of multiple symbols w/ same name
Even though normal aliases don't cause this, simple (single-use) aliases still do cause it.
2019-03-05 09:44:43 -08:00
Max Brunsfeld
f52271352b Merge branch 'master' into node-fields 2019-03-05 08:08:05 -08:00
Max Brunsfeld
ae0e89c297 lib: 0.3.9 2019-02-25 12:58:52 -08:00
Max Brunsfeld
a8a5e23e5e Make TreePropertyCursor respect field selectors 2019-02-14 10:15:18 -08:00
Max Brunsfeld
4f069fbe3b Merge branch 'master' into node-fields 2019-02-14 09:35:47 -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
Max Brunsfeld
2b685658db lib: 0.3.8 2019-02-11 09:46:26 -08:00