5 unstable releases

0.22.2 Feb 25, 2024
0.22.1 Feb 25, 2024
0.22.0 Feb 2, 2024
0.21.1 Jan 27, 2024
0.20.0 Nov 18, 2023

#454 in Text editors

Download history 412/week @ 2024-01-03 486/week @ 2024-01-10 329/week @ 2024-01-17 723/week @ 2024-01-24 1046/week @ 2024-01-31 1110/week @ 2024-02-07 1609/week @ 2024-02-14 3163/week @ 2024-02-21 2213/week @ 2024-02-28 2411/week @ 2024-03-06 2344/week @ 2024-03-13 2204/week @ 2024-03-20 1527/week @ 2024-03-27 1470/week @ 2024-04-03 1226/week @ 2024-04-10 968/week @ 2024-04-17

5,488 downloads per month
Used in 2 crates

MIT license

10MB
279K SLoC

C 277K SLoC JavaScript 1.5K SLoC // 0.0% comments Scheme 135 SLoC // 0.0% comments Rust 51 SLoC // 0.0% comments PHP 29 SLoC // 0.5% comments

tree-sitter-php

CI discord matrix crates npm

PHP grammar for tree-sitter.


lib.rs:

This crate provides php language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_php::language()).expect("Error loading php grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~71K SLoC