tree-sitter-qmljs

Crates.iotree-sitter-qmljs
lib.rstree-sitter-qmljs
version0.1.2
sourcesrc
created_at2021-12-29 02:24:32.473994
updated_at2022-10-12 03:00:22.146229
descriptionQML grammar for the tree-sitter parsing library
homepage
repositoryhttps://github.com/yuja/tree-sitter-qmljs
max_upload_size
id504570
size8,201,108
Yuya Nishihara (yuja)

documentation

README

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
Commit count: 117

cargo fmt