Commit graph

314 commits

Author SHA1 Message Date
dependabot[bot] 35c0fad26f build(deps-dev): bump rexml from 3.2.5 to 3.2.8 in /docs
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.5 to 3.2.8.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.5...v3.2.8)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-24 22:24:50 -04:00
dependabot[bot] 2653fac99b build(deps-dev): bump nokogiri from 1.16.2 to 1.16.5 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.16.2 to 1.16.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.16.2...v1.16.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-24 22:24:37 -04:00
ObserverOfTime 6bfdae00f2 docs: mention build command variables 2024-05-05 13:06:45 -04:00
Davis Vaughan 937dfbfbab Swap \s for \\s 2024-04-20 07:51:45 -04:00
Amaan Qureshi 96d18408a3 refactor(js): misc fixes & tidying 2024-04-11 22:35:43 -04:00
ObserverOfTime 63babea301 fix: proper function prototypes 2024-04-11 16:28:21 -04:00
JonCoole d569d0ea6a
docs: add NGINX grammar
Added the NGINX tree-sitter repository to the index.md list
2024-03-17 19:01:37 -04:00
Amaan Qureshi 99b93d83a1 feat(cli)!: add a separate build command to compile parsers
This allows users to build parsers without having to run `test` or
`parse` to invoke the compilation process, and allows them to output the
object file to wherever they like. The `build-wasm` command was merged
into this by just specifying the `--wasm` flag.
2024-03-17 05:36:30 -04:00
Giftpflanze 647d2e5c37
docs: fix typo 2024-03-12 02:29:55 -04:00
Boris Verkhovskiy c070c92722 refactor(wasm)!: make current*, is*, and has* methods properties 2024-03-08 00:27:06 -05:00
Novus Nota 43358f0c59
docs: Add Ohm language parser 2024-02-29 19:13:53 +01:00
Amaan Qureshi 3eb7366500 docs: document test attributes 2024-02-29 02:17:30 -05:00
Amaan Qureshi 60a935139b refactor!: remove top-level corpus dir for tests
It's confusing to have tests in two different top-level directories when working between different grammars, and most of them use `test/corpus` which is more fitting, so time to go.
2024-02-29 02:17:30 -05:00
ObserverOfTime b4b2d9cecc refactor: remove extern/const where possible 2024-02-29 01:50:04 -05:00
ObserverOfTime 502dacf220 refactor: rename TS_REUSE_ALLOCATOR flag
TREE_SITTER_REUSE_ALLOCATOR is more consistent
2024-02-27 15:54:38 -05:00
Amaan Qureshi f1eecf9786 feat: expose the allocator and array header files for external scanners 2024-02-26 09:43:13 -05:00
Amaan Qureshi 9e5bf6591f feat: improve language bindings
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
2024-02-25 19:06:01 -05:00
Seonghyeon Cho 80006d2f28
docs: add css for inline code 2024-02-24 18:36:23 -05:00
Novus Nota 464dbef794
docs: add Tact language parser 2024-02-16 23:31:07 +01:00
Amaan Qureshi 4342efd57e feat: allow specifying an external scanner's files 2024-02-16 16:31:56 -05:00
dundargoc bf9154febe docs: small fixes
Co-authored-by: Wang <bonede@qq.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2024-02-16 00:15:49 +01:00
Nickolay 6895b7a1e1
Add some documentation to the playground page
The minimal UI of the Playground could benefit from some documentation to make it easier for the newer users to understand what's going on. Also added a link to the new documentation from the local playground.

Closes https://github.com/tree-sitter/tree-sitter/issues/1305
2024-02-15 16:24:21 +01:00
Amaan Qureshi 665f5a0793 docs: explicitly mention behavior of walking outside the given "root" node for a TSTreeCursor 2024-02-14 15:54:46 -05:00
Amaan Qureshi 74812ced1b chore: deprecate C++ scanners
C++ has been a headache to deal with throughout the ecosystem and for
several downstream projects. It is difficult to get working with WASM,
and induces potential issues with compilation on Windows. It has been
proven that writing scanners in C is a much better alternative, and is
the recommended way to write scanners now. C++ support will likely be
removed in 0.21.0
2024-02-14 15:43:53 -05:00
Amaan Qureshi 792cbde728 docs: mention that token($.foo) is illegal 2024-02-12 17:17:37 -05:00
Amaan Qureshi 0109c877d5 docs: document regex limitations 2024-02-12 17:17:37 -05:00
Caleb White 6ccc1d11c8 chore: document preferred language for scanner 2024-02-09 03:21:23 -05:00
dundargoc df1fe842eb docs: various fixes
Closes https://github.com/tree-sitter/tree-sitter/issues/1317.
Closes https://github.com/tree-sitter/tree-sitter/issues/1752.
Closes https://github.com/tree-sitter/tree-sitter/issues/2439.

Co-authored-by: Simon Hengel <sol@typeful.net>
Co-authored-by: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Laytan Laats <laytanlaats@hotmail.com>
2024-02-08 00:08:59 +01:00
dependabot[bot] 7f3122bc00
build(deps-dev): bump nokogiri from 1.14.3 to 1.16.2 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.14.3 to 1.16.2.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.14.3...v1.16.2)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 21:04:01 +00:00
Amaan Qureshi 03abb6179c
Merge pull request #2780 from bugwelle/patch-1
fix(docs): Fix link to contributing guide
2024-02-05 01:13:03 -05:00
dependabot[bot] eb821761a1
build(deps-dev): bump activesupport from 7.0.4.3 to 7.1.3 in /docs
Bumps [activesupport](https://github.com/rails/rails) from 7.0.4.3 to 7.1.3.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.1.3/activesupport/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.0.4.3...v7.1.3)

---
updated-dependencies:
- dependency-name: activesupport
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-03 23:02:35 +00:00
Steven Kalt d35efd4608
feat(cli): support building WASM via podman
Previously, `tree-sitter build-wasm` had the ability to build WASM
by using docker to pull in an image with a complete emscripten toolchain.
This commit adds the ability to use podman to do the same thing.

Using podman requires two notable changes:
1. Using the fully-qualified image name. Docker defaults to prepending
    `docker.io` to the image name, but podman does not.
2. Podman will mount the `/src/` volume as belonging to root unless
  `--userns=keep-id` is passed. I think podman's different
  volume-ownership is related to podman's daemonless execution and
  `--uidmap` functionality, but I'm not 100% sure.

To test, I ran
```sh
script/fetch-fixtures
script/generate-fixtures
script/generate-fixtures-wasm # <- the important one!
```

which worked as well as the docker version.
2024-01-29 00:50:32 -05:00
Amaan Qureshi 571fc02bd4
docs: add various binding and grammar links
Co-authored-by: Ramkumar Ramachandra <r@artagnon.com>
Co-authored-by: Yutaro Sakamoto <yutaro-sakamoto@yutaro-sakamoto.com>
Co-authored-by: Philipp Mildenberger <philipp@mildenberger.me>
Co-authored-by: Sepehr Laal <5657848+3p3r@users.noreply.github.com>
Co-authored-by: Lachance, Alexandre <alexandrelachance@me.com>
Co-authored-by: Derek Stride <derek@stride.host>
Co-authored-by: John Didion <github@didion.net>
Co-authored-by: Felix Rath <felixm.rath@gmail.com>
Co-authored-by: Javier Suarez <jsuarez@salesforce.com>
Co-authored-by: Fabian Wermelinger <fab4100@posteo.net>
Co-authored-by: Colin Kennedy <ckanimate@gmail.com>
Co-authored-by: Alfred Fuller <afuller@buf.build>
Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>
Co-authored-by: Stanislav Romanov <kaermorchen@gmail.com>
Co-authored-by: Hamza Hamud <53880692+hhamud@users.noreply.github.com>
Co-authored-by: Tomas Sandven <tomas@sandven.email>
Co-authored-by: Vladimir Kazanov <vkazanov@inbox.ru>
Co-authored-by: citronneur <citronneur@gmail.com>
Co-authored-by: DennySun2100 <138833544+DennySun2100@users.noreply.github.com>
Co-authored-by: Z572 <37945516+Z572@users.noreply.github.com>
Co-authored-by: alaviss <leorize+oss@disroot.org>
2024-01-25 21:41:07 -05:00
Adrian Alic 6fd3582ae3
Add missing closing parenthesis 2024-01-25 20:45:46 -05:00
Andre Meyering 0da0da043e
fix(docs): Fix link to contributing guide
The link to the contribution guide on 
https://tree-sitter.github.io/tree-sitter/using-parsers was dead.
2023-11-24 09:59:00 +01:00
Firas al-Khalil 665da5e230 doc: fix multi-language program typo 2023-11-06 13:18:09 +01:00
Amaan Qureshi c5cb27e522
docs: improve predicate docs 2023-08-31 16:01:37 -04:00
Amaan Qureshi 95ab103f48
docs: update injection properties 2023-08-22 01:36:25 -04:00
Amaan Qureshi 45313e0dfb
feat: add injection.self to inject a node with itself 2023-08-18 18:37:57 -04:00
dependabot[bot] 5cca35e2ef
chore(deps-dev): bump commonmarker from 0.23.9 to 0.23.10 in /docs
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.9 to 0.23.10.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/v0.23.10/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.9...v0.23.10)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 20:25:20 +00:00
Ganesan Arjuna Maharaja f9f51480eb correcting the spelling of valid_symbols in indent dedent example 2023-07-29 20:55:33 +05:30
Amaan Qureshi c1d227bdb7
docs: document negative assertions 2023-07-25 00:32:40 -04:00
Andrew Hlynskyi 3c806913d8 docs: improve external scanner details and fix conflicting tokens details
* Removed convention notes introduced in #1947 due to:
  * It doesn't so strict for bindings and they may need to obey to some
    target language conventions.
  * For language grammars there is a note that states the same in the
    `Creating Parsers` section.
* Removed `External Scanning` item introduced in 87a0517 commit
  originated from #1612 due to unclear consistency with other
  5 original statements. There is a similar explanation in the
  `Other External Scanner Details` section.
2023-04-16 23:46:21 +03:00
Andrew Hlynskyi 613382c70a docs: update badges; fix markdown lint complains
Linter config `.vscode/settings.json`:
```json
{
    "[markdown]": {
        "files.trimTrailingWhitespace": false,
    },
    "markdownlint.config": {
        "default": true,
        // "ul-style": {
        //     "style": "asterisk"
        // },
        "MD001": false,
        "MD024": false,
        "MD025": false,
        "MD033": false,
        "MD041": false,
        "MD053": false,
    },
}
```
2023-04-16 23:39:08 +03:00
Andrew Hlynskyi d7fcc7aad3
Merge pull request #2206 from tree-sitter/fix-docs-prec-rules
docs: remove controversial statement
2023-04-15 05:43:04 +03:00
dependabot[bot] e47f05062a chore(deps): bump commonmarker from 0.23.8 to 0.23.9 in /docs
Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.8 to 0.23.9.
- [Release notes](https://github.com/gjtorikian/commonmarker/releases)
- [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.8...v0.23.9)

---
updated-dependencies:
- dependency-name: commonmarker
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-15 05:15:36 +03:00
Andrew Hlynskyi b5e6d18086 docs: add a grammar syntax sample for lexical precedence 2023-04-15 05:10:02 +03:00
Andrew Hlynskyi bfd56a1e59 docs: remove controversial Earliest Starting Position item added previously by 87a0517 2023-04-15 05:10:02 +03:00
Andrew Hlynskyi 1f051d339c chore(docs): fix misprint repetitions and remove dangling spaces 2023-04-09 20:40:18 +03:00
Kait Lam e3ea048db1 docs: alphabetise language bindings on front page
This helps with readability when scanning for a particular language. It is, strangely, almost sorted with the exception of Java and Kotlin.
2023-04-09 17:48:00 +03:00