Skip to content

Commit

Permalink
Update tree-sitter-ocaml Dependency to Official Repository (Resubmi…
Browse files Browse the repository at this point in the history
…ssion) (#44)
  • Loading branch information
cengelbart39 authored Jun 3, 2023
1 parent d0a99dd commit 02bdf65
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
6CA62EAB29F9D36700785B11 /* TreeSitterTSX in Frameworks */ = {isa = PBXBuildFile; productRef = 6CA62EAA29F9D36700785B11 /* TreeSitterTSX */; };
6CEC70FE29C3A85000B61C7A /* TreeSitterRegex in Frameworks */ = {isa = PBXBuildFile; productRef = 6CEC70FD29C3A85000B61C7A /* TreeSitterRegex */; };
7DB18E9729FDC51C00F8EC00 /* TreeSitterScala in Frameworks */ = {isa = PBXBuildFile; productRef = 7DB18E9629FDC51C00F8EC00 /* TreeSitterScala */; };
9D6DA3B8298F1A4600E69066 /* TreeSitterOCaml in Frameworks */ = {isa = PBXBuildFile; productRef = 9D6DA3B7298F1A4600E69066 /* TreeSitterOCaml */; };
9D6E74512A2B9B2A0070701E /* TreeSitterOCaml in Frameworks */ = {isa = PBXBuildFile; productRef = 9D6E74502A2B9B2A0070701E /* TreeSitterOCaml */; };
9DFDC3662A02D9BE0023B3BC /* TreeSitterMarkdown in Frameworks */ = {isa = PBXBuildFile; productRef = 9DFDC3652A02D9BE0023B3BC /* TreeSitterMarkdown */; };
/* End PBXBuildFile section */

Expand All @@ -59,6 +59,7 @@
285BF67329AAA45B00641989 /* TreeSitterLua in Frameworks */,
6CA62EAB29F9D36700785B11 /* TreeSitterTSX in Frameworks */,
2846B262296BA1CF005F60B6 /* TreeSitterDockerfile in Frameworks */,
9D6E74512A2B9B2A0070701E /* TreeSitterOCaml in Frameworks */,
282C119329AA32C8004F1EA6 /* TreeSitterSQL in Frameworks */,
28B3F039290C362C000CD04D /* TreeSitterElixir in Frameworks */,
28B3F02D290C35D9000CD04D /* TreeSitterC in Frameworks */,
Expand All @@ -72,7 +73,6 @@
28B3F036290C361D000CD04D /* TreeSitterCSS in Frameworks */,
28B3F033290C3608000CD04D /* TreeSitterCSharp in Frameworks */,
28B3F03F290C364D000CD04D /* TreeSitterGoMod in Frameworks */,
9D6DA3B8298F1A4600E69066 /* TreeSitterOCaml in Frameworks */,
28B3F063290C372D000CD04D /* TreeSitterZig in Frameworks */,
28B3F045290C366E000CD04D /* TreeSitterHTML in Frameworks */,
28B3F05A290C36E5000CD04D /* TreeSitterRust in Frameworks */,
Expand Down Expand Up @@ -184,7 +184,6 @@
282E5976298051980064B34A /* TreeSitterYAML */,
2886C787298135540023E016 /* TreeSitterKotlin */,
28171CB729814CD800523F1C /* TreeSitterObjC */,
9D6DA3B7298F1A4600E69066 /* TreeSitterOCaml */,
282C119229AA32C8004F1EA6 /* TreeSitterSQL */,
285BF67229AAA45B00641989 /* TreeSitterLua */,
6CEC70FD29C3A85000B61C7A /* TreeSitterRegex */,
Expand All @@ -193,6 +192,7 @@
6CA62EAA29F9D36700785B11 /* TreeSitterTSX */,
7DB18E9629FDC51C00F8EC00 /* TreeSitterScala */,
9DFDC3652A02D9BE0023B3BC /* TreeSitterMarkdown */,
9D6E74502A2B9B2A0070701E /* TreeSitterOCaml */,
);
productName = "CodeLanguages-Container";
productReference = 28B3F00C290C207D000CD04D /* CodeLanguages_Container.framework */;
Expand Down Expand Up @@ -246,14 +246,14 @@
282E5975298051980064B34A /* XCRemoteSwiftPackageReference "tree-sitter-yaml" */,
2886C786298135540023E016 /* XCRemoteSwiftPackageReference "tree-sitter-kotlin" */,
28171CB629814CD800523F1C /* XCRemoteSwiftPackageReference "tree-sitter-objc" */,
9D6DA3B6298F1A4500E69066 /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */,
282C119129AA32C8004F1EA6 /* XCRemoteSwiftPackageReference "tree-sitter-sql" */,
285BF67129AAA45B00641989 /* XCRemoteSwiftPackageReference "tree-sitter-lua" */,
6CEC70FC29C3A85000B61C7A /* XCRemoteSwiftPackageReference "tree-sitter-regex" */,
28AAB6AC29CA57D40087654B /* XCRemoteSwiftPackageReference "tree-sitter-dart" */,
6CA62EA729F9D36700785B11 /* XCRemoteSwiftPackageReference "tree-sitter-typescript" */,
7DB18E9529FDC51C00F8EC00 /* XCRemoteSwiftPackageReference "tree-sitter-scala" */,
9DFDC3642A02D9BE0023B3BC /* XCRemoteSwiftPackageReference "tree-sitter-markdown" */,
9D6E744F2A2B9B2A0070701E /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */,
);
productRefGroup = 28B3F00D290C207D000CD04D /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -735,11 +735,11 @@
kind = branch;
};
};
9D6DA3B6298F1A4500E69066 /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */ = {
9D6E744F2A2B9B2A0070701E /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/cengelbart39/tree-sitter-ocaml.git";
repositoryURL = "https://github.com/tree-sitter/tree-sitter-ocaml.git";
requirement = {
branch = feature/spm;
branch = master;
kind = branch;
};
};
Expand Down Expand Up @@ -904,9 +904,9 @@
package = 7DB18E9529FDC51C00F8EC00 /* XCRemoteSwiftPackageReference "tree-sitter-scala" */;
productName = TreeSitterScala;
};
9D6DA3B7298F1A4600E69066 /* TreeSitterOCaml */ = {
9D6E74502A2B9B2A0070701E /* TreeSitterOCaml */ = {
isa = XCSwiftPackageProductDependency;
package = 9D6DA3B6298F1A4500E69066 /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */;
package = 9D6E744F2A2B9B2A0070701E /* XCRemoteSwiftPackageReference "tree-sitter-ocaml" */;
productName = TreeSitterOCaml;
};
9DFDC3652A02D9BE0023B3BC /* TreeSitterMarkdown */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@
{
"identity" : "tree-sitter-ocaml",
"kind" : "remoteSourceControl",
"location" : "https://github.com/cengelbart39/tree-sitter-ocaml.git",
"location" : "https://github.com/tree-sitter/tree-sitter-ocaml.git",
"state" : {
"branch" : "feature/spm",
"revision" : "506d9a4a7709b3cb629e015476a8a640ac3c06ed"
"branch" : "master",
"revision" : "2da49308381b91e19e5d270ec5117616d0e4b135"
}
},
{
Expand Down
Binary file modified CodeLanguagesContainer.xcframework.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ In order to add support for additional languages we have a complete guide on how
| [Julia](https://github.com/tree-sitter/tree-sitter-julia) | | _not available_ |
| [Kotlin](https://github.com/lukepistrol/tree-sitter-kotlin/tree/feature/spm-queries) |||
| [Lua](https://github.com/lukepistrol/tree-sitter-lua/tree/feature/spm) |||
| [Markdown](https://github.com/ikatyang/tree-sitter-markdown) | | _not available_ |
| [Markdown](https://github.com/MDeiml/tree-sitter-markdown) | | |
| [Objective C](https://github.com/lukepistrol/tree-sitter-objc/tree/feature/spm) |||
| [OCaml](https://github.com/cengelbart39/tree-sitter-ocaml/tree/feature/spm) |||
| [OCaml](https://github.com/tree-sitter/tree-sitter-ocaml) |||
| Plain Text || _not available_ |
| [Perl](https://github.com/ganezdragon/tree-sitter-perl) | | _not available_ |
| [PHP](https://github.com/tree-sitter/tree-sitter-php) |||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@

(infix_expression
left: (value_path (value_name) @function)
(infix_operator) @operator
operator: (concat_operator) @operator
(#eq? @operator "@@"))

(infix_expression
(infix_operator) @operator
operator: (rel_operator) @operator
right: (value_path (value_name) @function)
(#eq? @operator "|>"))

Expand Down Expand Up @@ -85,22 +85,26 @@

(match_expression (match_operator) @keyword)

(value_definition [(let_operator) (and_operator)] @keyword)
(value_definition [(let_operator) (let_and_operator)] @keyword)

[
(prefix_operator)
(sign_operator)
(infix_operator)
(pow_operator)
(mult_operator)
(add_operator)
(concat_operator)
(rel_operator)
(and_operator)
(or_operator)
(assign_operator)
(hash_operator)
(indexing_operator)
(let_operator)
(and_operator)
(let_and_operator)
(match_operator)
] @operator

(infix_operator ["&" "+" "-" "=" ">" "|" "%"] @operator)
(signed_number ["+" "-"] @operator)

["*" "#" "::" "<-"] @operator

; Keywords
Expand Down
25 changes: 12 additions & 13 deletions Sources/CodeEditLanguages/Resources/tree-sitter-ocaml/tags.scm
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@

(infix_expression
left: (value_path (value_name) @name)
(infix_operator) @reference.call
operator: (concat_operator) @reference.call
(#eq? @reference.call "@@"))

(infix_expression
(infix_operator) @reference.call
operator: (rel_operator) @reference.call
right: (value_path (value_name) @name)
(#eq? @reference.call "|>"))

Expand All @@ -64,26 +64,25 @@
(comment)? @doc .
(value_definition
(let_binding
pattern: (parenthesized_operator [
(prefix_operator)
(infix_operator)
(hash_operator)
(indexing_operator)
(let_operator)
(and_operator)
(match_operator)
] @name)) @definition.function)
pattern: (parenthesized_operator (_) @name)) @definition.function)
(#strip! @doc "^\\(\\*\\*?\\s*|\\s\\*\\)$")
)

[
(prefix_operator)
(sign_operator)
(infix_operator)
(pow_operator)
(mult_operator)
(add_operator)
(concat_operator)
(rel_operator)
(and_operator)
(or_operator)
(assign_operator)
(hash_operator)
(indexing_operator)
(let_operator)
(and_operator)
(let_and_operator)
(match_operator)
] @name @reference.call

Expand Down
4 changes: 2 additions & 2 deletions build_framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ for lang in $LIST ; do
manifest=$(swift package dump-package)

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

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

# Determine if target paths are all '.'
same=1
Expand Down

0 comments on commit 02bdf65

Please sign in to comment.