Crate pepegsitter

Crate pepegsitter 

Source
Expand description

§PepegSitter

Crates.io License Build Status docs.rs

A collection of tree sitter parsers packaged into a single crate with tree-sitter-highlight support. The build.rs is also tuned to statically link parsers that depend on libstdc++.

Every parser is included as a git submodule and has it’s own Cargo Feature.

§Usage

Enable the parsers you need through cargo features, by default all features are enabled.

// Get the TreeSitter language
let _ = pepegsitter::bash::language();
// Get a new `HighlightConfiguration` for the language.
let _ = pepegsitter::bash::highlight();

// Queries are accessible module constants.
let _ = pepegsitter::bash::HIGHLIGHT_QUERY;

§Parsers

Currently includes the following parsers:

  • Bash
  • C
  • C++
  • CSS
  • D
  • Go
  • Haskell
  • Html
  • Java
  • JavaScript
  • Json
  • Lua
  • Markdown
  • Python
  • Rust
  • Toml
  • Typescript / TSX
  • Vim
  • Yaml

Modules§

bash
Tree-Sitter parser for this grammar.
c
Tree-Sitter parser for this grammar.
cpp
Tree-Sitter parser for this grammar.
css
Tree-Sitter parser for this grammar.
d
Tree-Sitter parser for this grammar.
go
Tree-Sitter parser for this grammar.
haskell
Tree-Sitter parser for this grammar.
html
Tree-Sitter parser for this grammar.
java
Tree-Sitter parser for this grammar.
javascript
Tree-Sitter parser for this grammar.
json
Tree-Sitter parser for this grammar.
lua
Tree-Sitter parser for this grammar.
markdown
Tree-Sitter parser for this grammar.
python
Tree-Sitter parser for this grammar.
rust
Tree-Sitter parser for this grammar.
toml
Tree-Sitter parser for this grammar.
tsx
Tree-Sitter parser for this grammar.
typescript
Tree-Sitter parser for this grammar.
vim
Tree-Sitter parser for this grammar.
yaml
Tree-Sitter parser for this grammar.