Skip to content

Commit 02bdf65

Browse files
authored
Update tree-sitter-ocaml Dependency to Official Repository (Resubmission) (#44)
1 parent d0a99dd commit 02bdf65

File tree

7 files changed

+40
-37
lines changed

7 files changed

+40
-37
lines changed

CodeLanguages-Container/CodeLanguages-Container.xcodeproj/project.pbxproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
6CA62EAB29F9D36700785B11 /* TreeSitterTSX in Frameworks */ = {isa = PBXBuildFile; productRef = 6CA62EAA29F9D36700785B11 /* TreeSitterTSX */; };
3939
6CEC70FE29C3A85000B61C7A /* TreeSitterRegex in Frameworks */ = {isa = PBXBuildFile; productRef = 6CEC70FD29C3A85000B61C7A /* TreeSitterRegex */; };
4040
7DB18E9729FDC51C00F8EC00 /* TreeSitterScala in Frameworks */ = {isa = PBXBuildFile; productRef = 7DB18E9629FDC51C00F8EC00 /* TreeSitterScala */; };
41-
9D6DA3B8298F1A4600E69066 /* TreeSitterOCaml in Frameworks */ = {isa = PBXBuildFile; productRef = 9D6DA3B7298F1A4600E69066 /* TreeSitterOCaml */; };
41+
9D6E74512A2B9B2A0070701E /* TreeSitterOCaml in Frameworks */ = {isa = PBXBuildFile; productRef = 9D6E74502A2B9B2A0070701E /* TreeSitterOCaml */; };
4242
9DFDC3662A02D9BE0023B3BC /* TreeSitterMarkdown in Frameworks */ = {isa = PBXBuildFile; productRef = 9DFDC3652A02D9BE0023B3BC /* TreeSitterMarkdown */; };
4343
/* End PBXBuildFile section */
4444

@@ -59,6 +59,7 @@
5959
285BF67329AAA45B00641989 /* TreeSitterLua in Frameworks */,
6060
6CA62EAB29F9D36700785B11 /* TreeSitterTSX in Frameworks */,
6161
2846B262296BA1CF005F60B6 /* TreeSitterDockerfile in Frameworks */,
62+
9D6E74512A2B9B2A0070701E /* TreeSitterOCaml in Frameworks */,
6263
282C119329AA32C8004F1EA6 /* TreeSitterSQL in Frameworks */,
6364
28B3F039290C362C000CD04D /* TreeSitterElixir in Frameworks */,
6465
28B3F02D290C35D9000CD04D /* TreeSitterC in Frameworks */,
@@ -72,7 +73,6 @@
7273
28B3F036290C361D000CD04D /* TreeSitterCSS in Frameworks */,
7374
28B3F033290C3608000CD04D /* TreeSitterCSharp in Frameworks */,
7475
28B3F03F290C364D000CD04D /* TreeSitterGoMod in Frameworks */,
75-
9D6DA3B8298F1A4600E69066 /* TreeSitterOCaml in Frameworks */,
7676
28B3F063290C372D000CD04D /* TreeSitterZig in Frameworks */,
7777
28B3F045290C366E000CD04D /* TreeSitterHTML in Frameworks */,
7878
28B3F05A290C36E5000CD04D /* TreeSitterRust in Frameworks */,
@@ -184,7 +184,6 @@
184184
282E5976298051980064B34A /* TreeSitterYAML */,
185185
2886C787298135540023E016 /* TreeSitterKotlin */,
186186
28171CB729814CD800523F1C /* TreeSitterObjC */,
187-
9D6DA3B7298F1A4600E69066 /* TreeSitterOCaml */,
188187
282C119229AA32C8004F1EA6 /* TreeSitterSQL */,
189188
285BF67229AAA45B00641989 /* TreeSitterLua */,
190189
6CEC70FD29C3A85000B61C7A /* TreeSitterRegex */,
@@ -193,6 +192,7 @@
193192
6CA62EAA29F9D36700785B11 /* TreeSitterTSX */,
194193
7DB18E9629FDC51C00F8EC00 /* TreeSitterScala */,
195194
9DFDC3652A02D9BE0023B3BC /* TreeSitterMarkdown */,
195+
9D6E74502A2B9B2A0070701E /* TreeSitterOCaml */,
196196
);
197197
productName = "CodeLanguages-Container";
198198
productReference = 28B3F00C290C207D000CD04D /* CodeLanguages_Container.framework */;
@@ -246,14 +246,14 @@
246246
282E5975298051980064B34A /* XCRemoteSwiftPackageReference "tree-sitter-yaml" */,
247247
2886C786298135540023E016 /* XCRemoteSwiftPackageReference "tree-sitter-kotlin" */,
248248
28171CB629814CD800523F1C /* XCRemoteSwiftPackageReference "tree-sitter-objc" */,
249-
9D6DA3B6298F1A4500E69066 /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */,
250249
282C119129AA32C8004F1EA6 /* XCRemoteSwiftPackageReference "tree-sitter-sql" */,
251250
285BF67129AAA45B00641989 /* XCRemoteSwiftPackageReference "tree-sitter-lua" */,
252251
6CEC70FC29C3A85000B61C7A /* XCRemoteSwiftPackageReference "tree-sitter-regex" */,
253252
28AAB6AC29CA57D40087654B /* XCRemoteSwiftPackageReference "tree-sitter-dart" */,
254253
6CA62EA729F9D36700785B11 /* XCRemoteSwiftPackageReference "tree-sitter-typescript" */,
255254
7DB18E9529FDC51C00F8EC00 /* XCRemoteSwiftPackageReference "tree-sitter-scala" */,
256255
9DFDC3642A02D9BE0023B3BC /* XCRemoteSwiftPackageReference "tree-sitter-markdown" */,
256+
9D6E744F2A2B9B2A0070701E /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */,
257257
);
258258
productRefGroup = 28B3F00D290C207D000CD04D /* Products */;
259259
projectDirPath = "";
@@ -735,11 +735,11 @@
735735
kind = branch;
736736
};
737737
};
738-
9D6DA3B6298F1A4500E69066 /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */ = {
738+
9D6E744F2A2B9B2A0070701E /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */ = {
739739
isa = XCRemoteSwiftPackageReference;
740-
repositoryURL = "https://github.com/cengelbart39/tree-sitter-ocaml.git";
740+
repositoryURL = "https://github.com/tree-sitter/tree-sitter-ocaml.git";
741741
requirement = {
742-
branch = feature/spm;
742+
branch = master;
743743
kind = branch;
744744
};
745745
};
@@ -904,9 +904,9 @@
904904
package = 7DB18E9529FDC51C00F8EC00 /* XCRemoteSwiftPackageReference "tree-sitter-scala" */;
905905
productName = TreeSitterScala;
906906
};
907-
9D6DA3B7298F1A4600E69066 /* TreeSitterOCaml */ = {
907+
9D6E74502A2B9B2A0070701E /* TreeSitterOCaml */ = {
908908
isa = XCSwiftPackageProductDependency;
909-
package = 9D6DA3B6298F1A4500E69066 /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */;
909+
package = 9D6E744F2A2B9B2A0070701E /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */;
910910
productName = TreeSitterOCaml;
911911
};
912912
9DFDC3652A02D9BE0023B3BC /* TreeSitterMarkdown */ = {

CodeLanguages-Container/CodeLanguages-Container.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
6.56 MB
Binary file not shown.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ In order to add support for additional languages we have a complete guide on how
6767
| [Julia](https://github.com/tree-sitter/tree-sitter-julia) | | _not available_ |
6868
| [Kotlin](https://github.com/lukepistrol/tree-sitter-kotlin/tree/feature/spm-queries) |||
6969
| [Lua](https://github.com/lukepistrol/tree-sitter-lua/tree/feature/spm) |||
70-
| [Markdown](https://github.com/ikatyang/tree-sitter-markdown) | | _not available_ |
70+
| [Markdown](https://github.com/MDeiml/tree-sitter-markdown) | | |
7171
| [Objective C](https://github.com/lukepistrol/tree-sitter-objc/tree/feature/spm) |||
72-
| [OCaml](https://github.com/cengelbart39/tree-sitter-ocaml/tree/feature/spm) |||
72+
| [OCaml](https://github.com/tree-sitter/tree-sitter-ocaml) |||
7373
| Plain Text || _not available_ |
7474
| [Perl](https://github.com/ganezdragon/tree-sitter-perl) | | _not available_ |
7575
| [PHP](https://github.com/tree-sitter/tree-sitter-php) |||

Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/highlights.scm

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@
4242

4343
(infix_expression
4444
left: (value_path (value_name) @function)
45-
(infix_operator) @operator
45+
operator: (concat_operator) @operator
4646
(#eq? @operator "@@"))
4747

4848
(infix_expression
49-
(infix_operator) @operator
49+
operator: (rel_operator) @operator
5050
right: (value_path (value_name) @function)
5151
(#eq? @operator "|>"))
5252

@@ -85,22 +85,26 @@
8585

8686
(match_expression (match_operator) @keyword)
8787

88-
(value_definition [(let_operator) (and_operator)] @keyword)
88+
(value_definition [(let_operator) (let_and_operator)] @keyword)
8989

9090
[
9191
(prefix_operator)
9292
(sign_operator)
93-
(infix_operator)
93+
(pow_operator)
94+
(mult_operator)
95+
(add_operator)
96+
(concat_operator)
97+
(rel_operator)
98+
(and_operator)
99+
(or_operator)
100+
(assign_operator)
94101
(hash_operator)
95102
(indexing_operator)
96103
(let_operator)
97-
(and_operator)
104+
(let_and_operator)
98105
(match_operator)
99106
] @operator
100107

101-
(infix_operator ["&" "+" "-" "=" ">" "|" "%"] @operator)
102-
(signed_number ["+" "-"] @operator)
103-
104108
["*" "#" "::" "<-"] @operator
105109

106110
; Keywords

Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/tags.scm

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@
4949

5050
(infix_expression
5151
left: (value_path (value_name) @name)
52-
(infix_operator) @reference.call
52+
operator: (concat_operator) @reference.call
5353
(#eq? @reference.call "@@"))
5454

5555
(infix_expression
56-
(infix_operator) @reference.call
56+
operator: (rel_operator) @reference.call
5757
right: (value_path (value_name) @name)
5858
(#eq? @reference.call "|>"))
5959

@@ -64,26 +64,25 @@
6464
(comment)? @doc .
6565
(value_definition
6666
(let_binding
67-
pattern: (parenthesized_operator [
68-
(prefix_operator)
69-
(infix_operator)
70-
(hash_operator)
71-
(indexing_operator)
72-
(let_operator)
73-
(and_operator)
74-
(match_operator)
75-
] @name)) @definition.function)
67+
pattern: (parenthesized_operator (_) @name)) @definition.function)
7668
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
7769
)
7870

7971
[
8072
(prefix_operator)
8173
(sign_operator)
82-
(infix_operator)
74+
(pow_operator)
75+
(mult_operator)
76+
(add_operator)
77+
(concat_operator)
78+
(rel_operator)
79+
(and_operator)
80+
(or_operator)
81+
(assign_operator)
8382
(hash_operator)
8483
(indexing_operator)
8584
(let_operator)
86-
(and_operator)
85+
(let_and_operator)
8786
(match_operator)
8887
] @name @reference.call
8988

build_framework.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ for lang in $LIST ; do
8888
manifest=$(swift package dump-package)
8989

9090
# use jq to get the target path
91-
targets=$(echo $manifest | jq -r '.targets[].path')
91+
targets=$(echo $manifest | jq -r '.targets[] | select(.type != "test") | .path')
9292

9393
# use jq to count number of targets
94-
count=$(echo $manifest | jq '.targets | length')
94+
count=$(echo $manifest | jq '[.targets[] | select(.type != "test")] | length')
9595

9696
# Determine if target paths are all '.'
9797
same=1

0 commit comments

Comments
 (0)