91 Commits

Author SHA1 Message Date
2b49f95b16 tree-sitter 0.20, --abi=14 2022-05-28 10:40:53 -04:00
Matt Massicotte
29f53d8f4f
Makefile and C bindings (#38) 2022-05-06 09:01:49 -07:00
Microsoft Provenance Contributions
161a92474a
Update package.json to include the repository key (#31)
With the rise in supply chain attacks and OSS dependencies being used as a attack vector, Microsoft is working with our ecosystem partners, such as the Linux Foundation's OpenSSF, to enable OSS consumers to track packages back to their public sources.
We've identified that the following packages published to NPM do not report where sources can be found, typically accomplished by including a link to your GitHub repository in your `package.json` REPOSITORY field. This PR was created to add this value, ensuring future releases will include this provenance information.
Published NPM packages with repository information:
* tree-sitter-html
2021-08-17 11:20:56 -07:00
Santos Gallegos
af9339f3de
Dont include trailing spaces in text nodes (#27)
* Don't include trailing spaces in text nodes

* Update tests
2021-07-11 11:04:28 -07:00
Max Brunsfeld
d93af487cc 0.19.0 2021-03-04 14:11:18 -08:00
Max Brunsfeld
b21591e6d3 Bump tree-sitter-cli to 0.19 2021-03-04 14:11:12 -08:00
Max Brunsfeld
7f442e1c61 Update queries to make use of new features 2020-07-20 12:46:52 -07:00
Max Brunsfeld
92c17db0a9 Update queries to use new syntax 2020-05-14 14:50:01 -07:00
Max Brunsfeld
047eafe80c ⬆️ tree-sitter-cli 2020-05-14 14:49:20 -07:00
Max Brunsfeld
8791121881 ⬆️ tree-sitter-cli 2020-03-02 13:32:53 -08:00
Max Brunsfeld
2147dd298a Update injection queries to use new API 2020-01-16 12:47:09 -08:00
Max Brunsfeld
2f1e21f38c 0.16.0 2019-12-10 10:25:14 -08:00
Max Brunsfeld
1c21687999 ⬆️ tree-sitter to 0.16 2019-12-10 10:25:03 -08:00
Max Brunsfeld
49fff05d9b 0.15.1 2019-12-02 17:10:27 -08:00
Max Brunsfeld
2af852d7b8 ⬆️ tree-sitter-cli 2019-12-02 17:10:24 -08:00
Max Brunsfeld
47841b3f8e
Add queries for syntax highlighting (#12)
* Add queries for syntax highlighting

* 🔥 property sheets
2019-10-17 15:04:35 -07:00
Max Brunsfeld
d99b24e035
Merge pull request #11 from ikatyang/fix/raw-text-end-tag-case-insensitive
fix: raw text end tags should be case insensitive
2019-10-04 09:59:33 -07:00
Ika
15c9cdb62f fix: raw text end tags should be case insensitive 2019-10-04 20:48:11 +08:00
Ika
0a4bfb63a6 test: add tests 2019-10-04 20:44:44 +08:00
Max Brunsfeld
aeb2f456b8 ⬆️ tree-sitter 2019-07-17 15:57:54 -07:00
Max Brunsfeld
1a2f4c0d39 0.15.0 2019-06-07 14:48:53 -07:00
Max Brunsfeld
dbaea0c5de Update to tree-sitter-cli 0.15.3 2019-06-07 14:48:48 -07:00
Max Brunsfeld
126f926a8f Use node 10 on travis and appveyor 2019-05-10 12:49:19 -07:00
Max Brunsfeld
a1df9b785c Use new tree-sitter highlight API in property sheets 2019-05-10 09:16:19 -07:00
Max Brunsfeld
95500a29f8
Merge pull request #9 from tree-sitter/signed-unsigned
Correctly cast `name_length`
2019-04-08 13:15:20 -07:00
Max Brunsfeld
4c7d5fe26c Don't scan opening tag names during error recovery 2019-03-03 18:21:25 -08:00
Max Brunsfeld
a923cb3fd7 Update tree-sitter section of package.json 2019-03-03 18:20:47 -08:00
Phil Turnbull
76f96c5979
Correctly cast name_length
`buffer[i++]` is a `signed char` so this cast does not correctly handle
negative values. If a custom tag has a length greater than 128 then
`buffer[i++]` is negative and so the `(uint16_t)` cast will cast it to a large
unsigned integer. This causes an out-of-bound read when reading the tag name.

We need to cast `name_length` to a `uint8_t` first, then widen to a `uint16_t`.
2019-02-26 12:05:01 -05:00
Max Brunsfeld
faa7edc877
Merge pull request #8 from tree-sitter/highlight-properties
Add property sheet for syntax highlighting
2019-02-19 11:41:39 -08:00
Max Brunsfeld
33aa996cbf Travis: Set CXX to clang++, not clang 2019-02-19 11:39:31 -08:00
Max Brunsfeld
aa01fdb9a9 Fix windows test script 2019-02-19 11:28:15 -08:00
Max Brunsfeld
cc9971242f Regenerate 2019-02-19 11:11:35 -08:00
Max Brunsfeld
30b7bf0f46 Make distinct nodes for style/script, set up injection 2018-12-14 17:43:41 -08:00
Max Brunsfeld
57b42ed645 Add property sheet for syntax highlighting 2018-12-13 17:23:56 -08:00
Max Brunsfeld
22e568ea75 0.13.5 2018-10-30 17:11:16 -07:00
Max Brunsfeld
01cf82e234
Merge pull request #4 from Aerijo/patch-1
Fix comment end bug
2018-10-28 20:30:23 -07:00
Benjamin Gray
2f31047048
Add tests for weird comment ends 2018-10-29 11:56:39 +11:00
Benjamin Gray
4df104a855
Fix comment bug 2018-10-29 11:44:27 +11:00
Max Brunsfeld
d9a5aff533 0.13.4 2018-08-30 13:24:31 -07:00
Max Brunsfeld
2d69fcd54f ⬆️ tree-sitter-cli 2018-08-30 13:00:47 -07:00
Max Brunsfeld
74882dc9ce 0.13.3 2018-08-30 11:28:26 -07:00
Max Brunsfeld
50073cde62 ⬆️ tree-sitter-cli for alias improvements 2018-08-30 11:28:22 -07:00
Max Brunsfeld
35f19b1bad 0.13.2 2018-08-29 13:06:24 -07:00
Max Brunsfeld
e7b12d1444
Merge pull request #3 from tree-sitter/fuzzer-fixes
Fix bugs found during fuzzing
2018-08-29 11:43:01 -07:00
Max Brunsfeld
461343bc17 Try using the default clang on travis 2018-08-29 11:40:01 -07:00
Max Brunsfeld
0f2d7e1083 Always serialize the full depth of the tag stack 2018-08-29 11:01:00 -07:00
Phil Turnbull
37b1bd4eef
Serialize as many tags as possible 2018-08-08 12:21:44 -04:00
Phil Turnbull
5877d9a30d
Prevent out-of-bounds read when deserializing
We first serialize the total number of tags, then serialize each individual
tag. If we don't have enough space to serialize a particular tag we stop
serializing any remaining tags.

However, this causes an out-of-bounds read when deserializing because there are
less tags than expected. Just bail when there are too many tags to serialize.
2018-08-07 14:40:33 -04:00
Phil Turnbull
e541c9b64b
Avoid integer cast issues when deserializing tags
`buffer` contains signed chars, so if a tag length is greater than 128 then it
is treated as a negative value when deserializing. The negative signed char is
then implicitly cast to a large unsigned integer. Explicitly cast the values to
signed chars

Co-authored-by: Rahul Zhade <zhade3@github.com>
2018-08-07 14:18:24 -04:00
Phil Turnbull
2eda6161d6
Avoid integer truncation when serializing tag lengths
A tag longer than 255 characters will be incorrectly serialized.

Co-authored-by: Rahul Zhade <zhade3@github.com>
2018-08-07 14:18:24 -04:00