File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ # This script is used to sync the upstream tree-sitter-swift grammar with the one used in this project.
4+ #
5+
6+ function sync_upstream_swift() {
7+ rm -fr tree-sitter-swift
8+ mkdir -p tree-sitter-swift
9+ cd tree-sitter-swift
10+ wget https://github.com/alex-pinkus/tree-sitter-swift/releases/download/0.7.1-pypi/tree-sitter-swift.tar.gz
11+ tar -xzf tree-sitter-swift.tar.gz
12+ cd ..
13+ cp -vf tree-sitter-swift/src/* .c Sources/TreeSitterSwift/src
14+ cp -vf tree-sitter-swift/src/tree_sitter/* .h Sources/TreeSitterSwift/src/tree_sitter/
15+ cp -vf bindings/swift/TreeSitterSwift/swift.h Sources/TreeSitterSwift/include/public.h
16+ cp -vf tree-sitter-swift/queries/locals.scm Sources/TreeSitterSwiftQueries/locals.scm
17+ cp -vf tree-sitter-swift/queries/highlights.scm Sources/TreeSitterSwiftQueries/highlights.scm
18+ }
19+
20+ function sync_upstream() {
21+ sync_upstream_swift
22+ }
23+
24+ sync_upstream
You can’t perform that action at this time.
0 commit comments