Commit graph

4085 commits

Author SHA1 Message Date
Léo Gaspard
3964651fc6
Derive Hash for Language
Given Language implements Eq, it can probably implement Hash too.

This makes it easy to derive a random identifier from a `Language`
2023-02-09 03:35:42 +01:00
Andrew Hlynskyi
5766b8a0a7 docs: apply scheme marker for all query syntax snippets 2023-02-06 21:33:50 +02:00
Max Brunsfeld
e021d6e979
Merge pull request #1990 from DeepChannel/fix/nanos-rollover
fix: possible rollover of nanoseconds in clock.h
2023-02-01 13:15:32 -08:00
Andrew Hlynskyi
6f42c78f2d
Merge pull request #2019 from verhovsky/error-message
cli: make error message more specific for building in `docker`
2023-01-27 11:45:04 +02:00
Andrew Hlynskyi
45eed724ce
Merge pull request #2035 from sogaiu/issue-2033
cli: Improve init-config with respect to TREE_SITTER_DIR
2023-01-27 11:42:33 +02:00
Andrew Hlynskyi
c31f1ac3f9
Merge pull request #2058 from tree-sitter/merge-doc-links
docs: merge of all binding and grammar link PRs
2023-01-27 10:46:44 +02:00
Andrew Hlynskyi
2e732d17dd docs: merge of all binding and grammar link PRs
Joined commit messages:
---

Closes: #2048

    docs: add capnp, smali, thrift

Closes: #2026

    Add Perl binding

Closes: #1989

    Add Ada to the list of available parsers

Closes: #1980

    Add clojure to list of available parsers

    After some discussion in
    https://github.com/sogaiu/tree-sitter-clojure/issues/28

    I decided to submit an issue to the tree-sitter organization
    to include tree-sitter-clojure in their list of available parsers.
    This repository is used by a couple of editors and tools, and
    I am using it to build a tree-sitter based programming mode
    for Clojure in Emacs.
    Since there are a couple of tools that depend on it, it seems
    worthy of inclusion in an official list of tree-sitter grammars.

Closes: #1943

    Add meson grammar to list.

Closes: #1926

    docs(meson): add parse for meson
    add meson

Closes: #1912

    Merge branch 'master' into add-heex-parser

Closes: #1908

    Add Apex to available parsers

Closes: #1876

    Add tree-sitter-gleam to list of available parsers

Closes: #1862

    DOCS: Add entries various SQL flavor parsers

Closes: #1857

    Add Go to the available language bindings

Closes: #1856

    docs: add jq grammar

Closes: #1828

    Add tree sitter lalrpop

    This is a parser for https://github.com/lalrpop/lalrpop,
    a parser generator for use in Rust.

    It is still in development because it should support some kind
    of highlighting of the pseudo rust code used in rules.

Closes: #1733

    Add YANG parser to parser list
    I wrote this parser over summer vacation last year and I've been using it at work every day since.

Closes: #1728

    Add link to m68k grammar
    Link to m68k (Motorola 68000 assembly) grammar in docs.

Closes: #1697

    Added rego language

Closes: #1694

    docs: add Formula parser

Closes: #1672

    docs: Add link to QML (Qt UI spec/programming language) parser

Closes: #1671

    parser: add beancount parser link

Closes: #1623

    Add link to llvm grammars
    Add links to LLVM IR, MIR and TableGen parsers.

Closes: #1579

    Add my Smali parser to the WIP list

Closes: #1575

    Update index.md

Closes: #1563

    Add re2c and sort alphabetically

    Added re2c parser (lexer generator).
    Sorted the list alphabetically case-insensitively.

Closes: #1209

    add link to chess Portable Game Notation grammar

Closes: #1176

    Add tree-sitter-lean.

Closes: #1123

    Add parsers to list

---
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
Co-authored-by: Felipe Gasper <FGasper@users.noreply.github.com>
Co-authored-by: Emmanuel Briot <briot.emmanuel@gmail.com>
Co-authored-by: Danny Freeman <dannyfreeman@users.noreply.github.com>
Co-authored-by: Garrett D'Amore <garrett@damore.org>
Co-authored-by: ShootingStarDragons <ShootingStarDragons@protonmail.com>
Co-authored-by: Clay <connorlay@users.noreply.github.com>
Co-authored-by: Anthony Heber <anthony@heber.dev>
Co-authored-by: Jonathan Arnett <jonarnett90@gmail.com>
Co-authored-by: takegue <takegue@gmail.com>
Co-authored-by: Cédric Fabianski <cedric@bearer.sh>
Co-authored-by: flurie <flurie@gmail.com>
Co-authored-by: traxys <quentin+dev@familleboyer.net>
Co-authored-by: Tomas Sandven <597206+Hubro@users.noreply.github.com>
Co-authored-by: Graham Bates <info@grahambates.com>
Co-authored-by: Lex <mr.x97@mail.ru>
Co-authored-by: Ben Siraphob <bensiraphob@gmail.com>
Co-authored-by: Yuya Nishihara <yuya@tcha.org>
Co-authored-by: WeiZhang <kweizh@gmail.com>
Co-authored-by: Flakebi <flakebi@t-online.de>
Co-authored-by: Yotam <me@yotam.net>
Co-authored-by: Fymyte <34305318+Fymyte@users.noreply.github.com>
Co-authored-by: Alexandre A. Muller <muller@outlook.com>
Co-authored-by: Roland Walker <walker@pobox.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: Santos Gallegos <stsewd@protonmail.com>
2023-01-27 10:15:23 +02:00
Andrew Hlynskyi
cca626afe7 docs: remove duplicated link 2023-01-27 07:49:07 +02:00
Max Brunsfeld
863318814c
Merge pull request #2037 from mattmassicotte/feature/parser-list
Include many new parsers in a unified list
2023-01-26 16:21:24 -08:00
Matt
ae3b60bd29
Include many new parsers in a unified list 2023-01-17 09:14:57 -05:00
sogaiu
23ce370fa3 cli: Stop config.json search sooner if TREE_SITTER_DIR set 2023-01-16 15:30:40 +09:00
sogaiu
adeb8d0aa9 cli: Make init-config respect TREE_SITTER_DIR 2023-01-16 15:30:38 +09:00
Andrew Hlynskyi
eb970a83a1
Merge pull request #2031 from tree-sitter/strip-cli-binary
cli: produce smaller release binary by stripping debug info
2023-01-15 22:24:21 +02:00
Andrew Hlynskyi
ced103b519 ci: rustup install rustfmt and clippy 2023-01-15 19:18:51 +02:00
Andrew Hlynskyi
7a56f08154 ci: bump setup-emsdk action version to @v12 2023-01-15 19:18:51 +02:00
Andrew Hlynskyi
5c1ca5adb0 cli: produce smaller release binary by stripping debug info 2023-01-15 04:32:18 +02:00
Andrew Hlynskyi
ca38c32d36 Exclude huge generated files from git diff output 2023-01-14 08:58:25 +02:00
Andrew Hlynskyi
f627a97d24 loader: use portable way of path joining 2023-01-11 04:12:13 +02:00
Andrew Hlynskyi
2949b210b9
Merge pull request #2020 from tree-sitter/tree-sitter-debug-in-test
Add setting TREE_SITTER_DEBUG in the test sub command
2023-01-10 12:17:33 +02:00
Andrew Hlynskyi
c7d431b53e Add setting TREE_SITTER_DEBUG in the test subcommand
Were asked in #1218
2023-01-10 10:47:24 +02:00
Boris Verkhovskiy
61b85b2664 Make error message more specific 2023-01-08 08:10:14 -07:00
Andrew Hlynskyi
9ac55f79d1 Update Makefile VERSION to 0.20.9 from lib/Cargo.toml
Closes #1158
Closes #1608
2023-01-08 04:39:46 +02:00
Andrew Hlynskyi
0d3fd603e1
Merge pull request #2013 from tree-sitter/close-1336
Closes #1336
2023-01-06 11:09:54 +02:00
Andrew Hlynskyi
108d0ecede loader: add TREE_SITTER_LIBDIR; cli: add --libdir to tree-sitter generate
Closes #1336
2023-01-06 10:28:47 +02:00
Andrew Hlynskyi
5088781ef9 cli: add -b, --build flags for tree-sitter generate 2023-01-06 10:28:47 +02:00
Andrew Hlynskyi
ad45f5cd2c Remove unused no-minimize arg for the generate command 2023-01-06 10:28:47 +02:00
Andrew Hlynskyi
8a888a69fe
Merge pull request #2015 from tree-sitter/update-ci-action-versions
Update CI action versions
2023-01-06 10:28:19 +02:00
Andrew Hlynskyi
e733a07a5c Update CI action versions 2023-01-06 10:05:27 +02:00
Andrew Hlynskyi
896de71e4f
Merge pull request #2014 from tree-sitter/fix-wasm-tests
Fix wasm tests and bump Emscripten version to 3.1.29
2023-01-06 09:46:31 +02:00
Andrew Hlynskyi
88fe1d00c4 Bump Emscripten version to 3.1.29 2023-01-06 08:32:31 +02:00
Andrew Hlynskyi
19bd5868eb Fix wasm tests 2023-01-06 08:32:26 +02:00
Andrew Hlynskyi
9737fcb558 Merge pull request #1612 from tlaplus-community/update-creating-parser-docs 2023-01-03 02:57:50 +02:00
Andrew Helwer
278ff01e71 Added additional documentation details
* External scanners and infinite loops
* Terminal keywords in externals array
* Using error sentinel external token
* Good practice to erase state variables in deserialize func
* Emphasize external scanner is called first
2023-01-03 02:48:55 +02:00
Andrew Helwer
87a0517f3c Various updates to Creating Parsers docs
* Documented test separator suffixes
* Documented partial precedences field
* Added external scanning to conflicting tokens rules
* Added earliest starting position to conflicting tokens rules
* Added note about lexical precedence vs. parse precedence
* Added note about tree-sitter calling external scanner with all
  tokens marked valid during error recovery
2023-01-03 02:48:48 +02:00
Andrew Hlynskyi
b1024a1493 cli: Fix build.rs in case of the current branch ref was packed
Support SHA lookup in .git/packed-refs
2023-01-03 00:44:01 +02:00
Andrew Hlynskyi
3e8d029ab3 Merge pull request #653 from ahelwer:patch-1 2023-01-02 02:31:24 +02:00
Andrew Helwer
dddbc2d4f7 Added working commands for Windows users
Windows users are likely to be using either Windows Terminal (which uses PowerShell) or PowerShell directly.
2023-01-02 02:31:06 +02:00
Phil Freeman
eb549a89ad fix: possible rollover of nanoseconds in clock.h 2022-12-14 09:43:58 -08:00
Andrew Hlynskyi
c669e5ee15 Fix permanent rebuild triggering in a git worktree due to wrong git branch file path 2022-12-11 19:16:20 +02:00
Andrew Hlynskyi
870fb8772f
Merge pull request #1953 from tree-sitter/fix/playground-port-bind-racing
fix(cli): Racing on playground webserver port binding
2022-11-16 06:28:43 +02:00
Max Brunsfeld
8883d43bee
Merge pull request #1941 from mliszcz/master
Fix test output formatting for rules starting with M/U
2022-11-15 17:13:39 -08:00
Max Brunsfeld
b31f9e6e90
Merge pull request #1913 from J3RN/browser-fixes
Allow web-tree-sitter to work with Emscripten 3
2022-11-15 17:03:31 -08:00
Max Brunsfeld
1f36bf091e Upgrade to emscripten 3.1.25 2022-11-15 16:39:17 -08:00
Jonathan Arnett
e4fc6653ee Add __cxa_atexit to exports 2022-11-15 16:39:17 -08:00
Jonathan Arnett
56e9753b5f Add memset to exports 2022-11-15 16:39:17 -08:00
Jonathan Arnett
a8988339c3 Add 'stringToUTF16' and 'AsciiToString' to exported method 2022-11-15 16:39:17 -08:00
Jonathan Arnett
813216be9a Configure compiled WASM grammars to not catch rejections 2022-11-15 16:39:17 -08:00
Max Brunsfeld
37e0e8a7ab
Merge pull request #1918 from alanz/add-erlang-complete
Add Erlang to list of Available Parsers
2022-11-15 16:27:39 -08:00
mliszcz
7bf2484d81 Fix test output formatting for rules starting with M/U
Previously the rule names could not begin with an uppercase M or U
because the test output formatter assumed that they represent special
tokens: MISSING or UEXPECTED.

Fixes #1940.
2022-11-15 20:20:44 +01:00
Max Brunsfeld
36b5b6c89e
Merge pull request #1952 from tree-sitter/tree-included-ranges
Allow retrieving a tree's list of included ranges, fix some included range bugs
2022-11-14 16:54:58 -08:00