Max Brunsfeld
177ba49e57
Add script for dumping the sizes of each symbol in a dynamic library
2019-06-16 11:17:53 -07:00
Andrey Zaytsev
7f2233ddaf
Ts tree cursor copy ( #363 )
...
* add ts_tree_cursor_copy fn
* indentation
2019-06-16 10:52:37 -07:00
Max Brunsfeld
0e046fc6c0
Fix bug when the assert macro is disabled
...
Fixes #364
2019-06-14 14:23:38 -07:00
Max Brunsfeld
b2e3105acb
Add verilog and systemrdl grammars to the docs
2019-06-13 11:51:53 -07:00
Max Brunsfeld
80b785daee
Improve behavior of node descendant queries with single positions
2019-06-13 10:53:59 -07:00
Nathan Sobo
4ac56b4f3f
Merge pull request #361 from as-cii/dont-use-clock-monotonic-on-mac
...
Don't use `clock_gettime` on macOS
2019-06-12 12:31:45 -05:00
Antonio Scandurra
25b0fbd679
Don't use clock_gettime on macOS
...
This commit stops using the monotonic clock API on macOS because it is
supported only on macOS >= 10.12. Instead, it uses the fallback clock
APIs for platforms without monotonic clock support.
The use of `clock_gettime` was causing issues on Atom because, even
though we build it on a new macOS version supporting such API, some
users may run Atom on older versions of macOS. On those platforms, Atom
would crash whenever opening a file parsed with a tree-sitter grammar.
2019-06-12 19:03:46 +02:00
Max Brunsfeld
a1682eb81c
Handle injection-includes-children in highlighting property sheets
2019-06-11 16:59:33 -07:00
Max Brunsfeld
4d4e4f3909
Fix problems with build-wasm command
...
* Check that docker is on the PATH before trying to run it
* Don't try to use id(1) if using docker on windows
* Add error message if neither emcc nor docker are available
Fixes #358
2019-06-10 11:40:36 -07:00
Max Brunsfeld
07e49c4c59
0.15.3
2019-06-07 09:15:38 -07:00
Max Brunsfeld
c2e1f680e3
Merge pull request #354 from tree-sitter/eager-state-merging
...
Fix limitations of the parse state merging algorithm to produce tables with fewer states
2019-06-06 15:51:35 -07:00
Max Brunsfeld
f7d25a5934
Fix missed opportunities to merge parse states
2019-06-06 15:29:22 -07:00
Max Brunsfeld
fa68ef4cea
Make git sha optional at build time
...
Fixes #352
2019-06-06 13:12:53 -07:00
Max Brunsfeld
dbecdf6c2e
Merge pull request #351 from paulyoung/patch-1
...
Fix ALLOW_MEMORY_GROWTH setting
2019-06-04 19:43:07 -07:00
Paul Young
15bf75a2f9
Fix ALLOW_MEMORY_GROWTH setting
...
Fixes ERROR:root:ALLOW_MEMORY_GROWTH: No such file or directory ("ALLOW_MEMORY_GROWTH" was expected to be an input file, based on the commandline arguments provided) according to https://emscripten.org/docs/optimizing/Optimizing-Code.html#memory-growth
2019-06-04 17:17:25 -07:00
Max Brunsfeld
3a51b23f1a
web: 0.15.6
2019-06-03 16:19:16 -07:00
Max Brunsfeld
1cef6d4550
web: Don't require Parser.init to be called immediately
2019-06-03 16:18:49 -07:00
Max Brunsfeld
e195f27d68
Merge pull request #348 from francisfuzz/patch-1
...
s/Ucsing/Using
2019-05-31 13:22:33 -07:00
francisfuzz
ec7def2e62
s/Ucsing/Using
2019-05-31 13:06:39 -07:00
Max Brunsfeld
790b5558be
web: 0.15.5
2019-05-31 11:14:45 -07:00
Max Brunsfeld
e58b69e3b8
Include type declarations in npm tarball
2019-05-31 11:14:29 -07:00
Max Brunsfeld
2084745152
0.15.4
2019-05-31 10:43:42 -07:00
Max Brunsfeld
31537a68c6
Bump library versions
2019-05-31 10:24:29 -07:00
Max Brunsfeld
85877a1def
0.15.2
2019-05-31 09:37:10 -07:00
Max Brunsfeld
7530b0f77a
Add link to lua parser in the docs
2019-05-31 09:20:49 -07:00
Max Brunsfeld
85fa31d972
Mention wasm tests in contributing doc
2019-05-31 09:18:34 -07:00
Max Brunsfeld
94b72956ea
Merge pull request #346 from Razzeee/patch-1
...
Add elm tree sitter
2019-05-31 09:18:07 -07:00
Razzeee
53b30af003
Add elm tree sitter
2019-05-31 13:25:14 +02:00
Max Brunsfeld
2f06abf984
Start work on contributing guide
2019-05-30 17:53:20 -07:00
Max Brunsfeld
d274e81d0d
Overhaul CLI error handling to allow multiple levels of context
2019-05-30 16:52:55 -07:00
Max Brunsfeld
b7bc2d30ae
Merge pull request #345 from tree-sitter/delete_nulls_safely
...
Make ts_tree_delete and ts_parser_delete NULL-safe.
2019-05-30 13:01:56 -07:00
Max Brunsfeld
f5163126c8
generate-fixtures-wasm: handle language repos w/ multiple grammars
...
Refs tree-sitter/tree-sitter-typescript#68
2019-05-30 12:34:03 -07:00
Max Brunsfeld
5bb06682d5
Allow dynamically loading grammars w/ no package.json file
2019-05-30 12:05:53 -07:00
Max Brunsfeld
314f3fa00c
generate-fixtures: handle language repos that contain multiple grammars
...
Refs tree-sitter/tree-sitter-typescript#68
2019-05-30 12:00:12 -07:00
Max Brunsfeld
da93e55f3a
In benchmarks, handle language repos that contain multiple grammars
...
Refs tree-sitter/tree-sitter-typescript#68
2019-05-30 10:17:27 -07:00
Patrick Thomson
6e2a60629c
Make ts_tree_delete and ts_parser_delete NULL-safe.
...
Historically, `free(3)`-style functions have been NULL-safe, to make
resource handling functions more robust. This doesn't seem to be the
case with tree-sitter's `ts_tree_delete` and `ts_parser_delete` C
functions, which immediately dereference the passed pointer. This
leads to complexity in client libraries that have to ensure that trees
and parsers are cleaned up correctly.
This patch adds NULL checks to `parse_delete` and `tree_delete`. They
should have negligable performance impacts, since null checks are fast.
I didn't change the internal _delete functions, as arguably those
being NULL-unsafe is a feature, not a bug.
2019-05-30 11:47:56 -04:00
Max Brunsfeld
659f2825ba
Merge pull request #342 from georgewfraser/patch-1
...
Add type definitions
2019-05-28 15:31:23 -07:00
George Fraser
0fe67dc8b4
Dedent
2019-05-28 23:01:41 +01:00
Max Brunsfeld
6055108936
Wasm: 0.15.3
2019-05-28 13:00:17 -07:00
Max Brunsfeld
068f7b1a0c
Wasm: Throw an exception if Parser is constructed before init() resolves
2019-05-28 12:59:00 -07:00
George Fraser
d4597e14f4
Reference tree-sitter-web.d.ts in package.json
2019-05-27 15:10:43 +01:00
George Fraser
a0d0ba9709
Add type definitions
...
This is based on https://github.com/tree-sitter/node-tree-sitter/blob/master/tree-sitter.d.ts with slight modifications because web-tree-sitter has a slightly different interface than node-tree-sitter
2019-05-27 15:08:29 +01:00
Max Brunsfeld
621efeb543
Merge pull request #340 from fdionisi/fix/is-point
...
Ensure Point has `column` typeof number field
2019-05-24 07:35:00 -07:00
Federico
51345f3ea2
Ensure Point has column typeof number field
2019-05-24 14:34:04 +02:00
Max Brunsfeld
3ec91a8d8a
Wasm: When in node, use fs APIs to load language wasm files
...
Fixes #338
2019-05-23 16:12:32 -07:00
Max Brunsfeld
ae41a78d3c
Discard local emsdk changes when fetching emscripten on CI
2019-05-22 10:41:19 -07:00
Max Brunsfeld
2cbcd2b7b0
Merge pull request #336 from ccharles/reorder-doc-objects-for-consistency
...
Reorder objects in documentation for clarity
2019-05-21 09:03:55 -07:00
Chris Charles
9ce9a53298
Reorder objects in documentation for consistency
...
The documentation lists four types of objects, the C names for them,
and a summary for each. These are now shown in the same order.
2019-05-21 07:52:23 -04:00
Max Brunsfeld
70038bd251
Build wasm lib with -O3
...
There doesn't seem to be much code size difference, but there's
a big performance difference.
2019-05-17 12:50:00 -07:00
Max Brunsfeld
23c6d78674
Fix presentation of missing nodes in parse command
2019-05-15 16:25:53 -07:00