Commit graph

2556 commits

Author SHA1 Message Date
Max Brunsfeld
dfd012d13d
Merge pull request #367 from tree-sitter/node-type-children
Include info about children w/o fields in node-types.json
2019-06-20 14:06:27 -07:00
Sebastián Gurin
bd97ad5c4c Wasm file generation note in readme (#368)
* readme .wasm file generate and usage in node.js

* generate wasm language files readme note
2019-06-20 14:06:09 -07:00
Max Brunsfeld
70dc79b412 Merge lex states more liberally 2019-06-20 14:05:15 -07:00
Max Brunsfeld
fe6a69a626 Sort lex states 2019-06-20 13:01:28 -07:00
Max Brunsfeld
ead37c29c6 Tighten timeouts in parse timeout tests 2019-06-20 09:57:38 -07:00
Max Brunsfeld
5b38ff5f78 Loosen lex state equality check to catch some spurious duplicates 2019-06-20 09:57:38 -07:00
Max Brunsfeld
e4873191d6 Refactor generated lex function to use fewer instructions per state 2019-06-20 09:57:38 -07:00
Max Brunsfeld
28011b1e60 Add ts_node_is_extra API 2019-06-19 15:58:29 -07:00
Max Brunsfeld
0ad4e147e2 Dedup types in children property of node-types 2019-06-19 15:35:53 -07:00
Max Brunsfeld
ee1d4d6b2c Fix handling of inlined rules in node-types generation 2019-06-19 15:30:48 -07:00
Max Brunsfeld
0a2b183bd0 Add a unit test for the children property in node-types 2019-06-17 13:24:13 -07:00
Max Brunsfeld
381cb09c64 Include info about children w/o fields in node-types.json 2019-06-17 11:35:06 -07:00
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