add make rule to fetch qtdeclarative repo and try parsing *.qml files

pull/361/head
Yuya Nishihara 2021-12-24 15:48:48 +07:00
parent 9716e357fb
commit 4b6f2a210e
3 changed files with 21 additions and 0 deletions

1
.gitignore vendored

@ -4,6 +4,7 @@
/Cargo.lock
/build/
/examples/qtdeclarative
/node_modules/
/package-lock.json
/target/

@ -5,6 +5,8 @@ help:
@echo 'Make targets:'
@echo ' generate - generate parser sources'
@echo ' tests - run all tests'
@echo ' fetch-examples - fetch example repositories'
@echo ' parse-examples - parse example files'
.PHONY: generate
generate:
@ -17,3 +19,11 @@ src/typescript-scanner.h: node_modules/tree-sitter-typescript/common/scanner.h
.PHONY: tests
tests:
$(TREE_SITTER) test $(TESTFLAGS)
.PHONY: fetch-examples
fetch-examples:
$(MAKE) -C examples all
.PHONY: parse-examples
parse-examples:
$(TREE_SITTER) parse -q 'examples/**/*.qml'

@ -0,0 +1,10 @@
GIT = git
.PHONY: all
all: qtdeclarative
.PHONY: qtdeclarative
qtdeclarative:
[ -d $@ ] || $(GIT) clone git://code.qt.io/qt/qtdeclarative.git $@
$(GIT) -C $@ fetch
$(GIT) -C $@ reset --hard 3d23912b0e9710dad7ecaf238690e4a7d253534d