5 unstable releases

0.3.0 Oct 17, 2025
0.2.0 Jan 2, 2025
0.1.2 Oct 12, 2022
0.1.1 Jul 7, 2022
0.1.0 Dec 29, 2021

#856 in Parser implementations

Download history 231/week @ 2025-12-10 318/week @ 2025-12-17 223/week @ 2025-12-24 452/week @ 2025-12-31 457/week @ 2026-01-07 436/week @ 2026-01-14 436/week @ 2026-01-21 762/week @ 2026-01-28 455/week @ 2026-02-04 467/week @ 2026-02-11 623/week @ 2026-02-18 986/week @ 2026-02-25 623/week @ 2026-03-04 1226/week @ 2026-03-11 752/week @ 2026-03-18 1128/week @ 2026-03-25

3,880 downloads per month
Used in 2 crates

MIT license

10MB
316K SLoC

C 316K SLoC JavaScript 312 SLoC // 0.1% comments Scheme 47 SLoC // 0.1% comments Rust 36 SLoC // 0.1% comments

tree-sitter-qmljs

QML grammar for the tree-sitter parsing library.

References

Pitfalls

Since grouped binding notation is syntactically ambiguous, it is parsed as an object definition.

// (ui_object_definition type_name: (identifier "Button") ...)
Button {
    // (ui_object_definition type_name: (identifier "icon") ...)
    icon { source: "foo.png"; color: "transparent" }
}

Building

Use the master branch, which contains all generated files.

$ git checkout master
$ npm install
$ cargo build --release

Hacking

Use the dev branch, but you'll first need to run npm install in the master branch.

$ git checkout master
$ npm install
$ git checkout dev

Generate code and run tests:

$ make generate tests

Make sure example QML files can be parsed:

$ make fetch-examples parse-examples

Dependencies