difftastic/vendored_parsers/tree-sitter-qmljs
Wilfred Hughes e52849ebba Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98' 2024-02-15 08:54:57 +07:00
..
.github/workflows Rename vendor/ directory 2023-01-10 08:35:01 +07:00
bindings Rename vendor/ directory 2023-01-10 08:35:01 +07:00
examples Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98' 2024-02-15 08:54:57 +07:00
queries Rename vendor/ directory 2023-01-10 08:35:01 +07:00
src Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98' 2024-02-15 08:54:57 +07:00
test Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98' 2024-02-15 08:54:57 +07:00
.gitignore Rename vendor/ directory 2023-01-10 08:35:01 +07:00
Cargo.toml Merge commit 'ab75be9750e6f2f804638824d1790034286a830c' 2023-03-17 00:45:03 +07:00
LICENSE Rename vendor/ directory 2023-01-10 08:35:01 +07:00
Makefile Rename vendor/ directory 2023-01-10 08:35:01 +07:00
README.md Rename vendor/ directory 2023-01-10 08:35:01 +07:00
binding.gyp Rename vendor/ directory 2023-01-10 08:35:01 +07:00
grammar.js Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98' 2024-02-15 08:54:57 +07:00
package.json Merge commit '9fa49ff3315987f715ce5666ff979a7742fa8a98' 2024-02-15 08:54:57 +07:00

README.md

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