Crate syntastica_parsers_git

Source
Expand description

§syntastica-parsers-git

Collection of tree-sitter parsers for syntastica, fetching with git in the build-script.

See the project overview for more information on all parser collections.

§Improving compilation speed

Due to the nature of this parser collection, compilation can take a very long time with many parsers enabled, since all parsers are cloned and built every time the build script is run. In a local development environment you can use the following environment variables to reuse files from a previous run.

§Option one: Setting a different clone directory

You can set SYNTASTICA_PARSERS_CLONE_DIR to a directory to clone the parser repositories to, so that they only have to be built but not downloaded every time.

§Option two: Reusing built archives

Set SYNTASTICA_PARSERS_CACHE_DIR to a directory where all built parsers will be copied to. When a binary for a parser is already present in that directory, it will be reused the next time the build script is run.

§Parser generation

Some parsers don’t include the generated parser.c file in their git checkouts and instead require users to generate it themselves based on the grammer.js. This collection supports that, but this requires you to have a working JavaScript runtime installed on your system. By default, node is assumed, but you can override that to bun or deno by setting the SYNTASTICA_PARSERS_JS_RUNTIME environment variable. These parsers will only be in the all group, so unless you use that group or one of the affected parsers specifically, you don’t have to worry about this.

§List of included parsers

List of parsers included in the some feature
List of parsers additionally included in the most feature
List of parsers additionally included in the all feature

§Features

Every supported language has a feature with the same name as the respective public function. Additionally the three feature groups some, most, and all are available.

  • some — Include parsers for the most widely known supported languages.
  • most — Implies some. Include parsers for most common languages.
  • all — Implies most. Include parsers for all supported languages.
  • runtime-c (enabled by default) — Use the standard tree-sitter C runtime. See syntastica’s WebAssembly support for more information.
  • runtime-c2rust — Use the pure Rust tree-sitter runtime. See syntastica’s WebAssembly support for more information.
  • docs — Meant to be enabled when building docs

Structs§

LanguageSetImpl
An implementation of LanguageSet including all languages in the enabled feature set.

Enums§

Lang
An enum of every supported language in the current feature set.

Constants§

LANGUAGES
A list of all languages supported by the current feature set.
LANGUAGE_NAMES
A list of all language names supported by the current feature set.

Functions§

asmmost or asm
Get the parser for asm.
bashsome or bash
Get the parser for bash.
bibtexall or bibtex
Get the parser for bibtex.
csome or c
Get the parser for c.
c_sharpmost or c_sharp
Get the parser for c_sharp.
clojuremost or clojure
Get the parser for clojure.
cmakemost or cmake
Get the parser for cmake.
commentmost or comment
Get the parser for comment.
cppsome or cpp
Get the parser for cpp.
csssome or css
Get the parser for css.
dartmost or dart
Get the parser for dart.
diffmost or diff
Get the parser for diff.
dockerfileall or dockerfile
Get the parser for dockerfile.
ebnfall or ebnf
Get the parser for ebnf.
ejsall or ejs
Get the parser for ejs.
elixirmost or elixir
Get the parser for elixir.
erball or erb
Get the parser for erb.
fishall or fish
Get the parser for fish.
gleamall or gleam
Get the parser for gleam.
gosome or go
Get the parser for go.
haskellmost or haskell
Get the parser for haskell.
hexdumpall or hexdump
Get the parser for hexdump.
htmlsome or html
Get the parser for html.
javasome or java
Get the parser for java.
javascriptsome or javascript
Get the parser for javascript.
jsdocmost or jsdoc
Get the parser for jsdoc.
jsonsome or json
Get the parser for json.
json5most or json5
Get the parser for json5.
jsoncmost or jsonc
Get the parser for jsonc.
juliaall or julia
Get the parser for julia.
kotlinsome or kotlin
Get the parser for kotlin.
lalrpopall or lalrpop
Get the parser for lalrpop.
latexall or latex
Get the parser for latex.
llvm(all or llvm) and non-target_family="wasm"
Get the parser for llvm. (not supported on WebAssembly targets)
luasome or lua
Get the parser for lua.
luapmost or luap
Get the parser for luap.
makemost or make
Get the parser for make.
markdownmost or markdown
Get the parser for markdown.
markdown_inlinemost or markdown_inline
Get the parser for markdown_inline.
nixmost or nix
Get the parser for nix.
ocamlall or ocaml
Get the parser for ocaml.
ocaml_interfaceall or ocaml_interface
Get the parser for ocaml_interface.
phpmost or php
Get the parser for php.
php_onlymost or php_only
Get the parser for php_only.
printfmost or printf
Get the parser for printf.
pythonsome or python
Get the parser for python.
qlall or ql
Get the parser for ql.
regexmost or regex
Get the parser for regex.
rubymost or ruby
Get the parser for ruby.
rushall or rush
Get the parser for rush.
rustsome or rust
Get the parser for rust.
scalamost or scala
Get the parser for scala.
scssmost or scss
Get the parser for scss.
sqlmost or sql
Get the parser for sql.
swiftmost or swift
Get the parser for swift.
tomlsome or toml
Get the parser for toml.
tsxsome or tsx
Get the parser for tsx.
typescriptsome or typescript
Get the parser for typescript.
typstmost or typst
Get the parser for typst.
ursaall or ursa
Get the parser for ursa.
verilogall or verilog
Get the parser for verilog.
watall or wat
Get the parser for wat.
yamlsome or yaml
Get the parser for yaml.
zigmost or zig
Get the parser for zig.