Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to latest tree-sitter-ocaml #469

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ jobs:
# - medium+: 6 GB
# - large: 8 GB
# - xlarge: 16 GB
resource_class: xlarge
#old:
# resource_class: xlarge
# but we're not paying anymore for circleCI, to consolidate Github Actions
#TODO: port this workflow to GHA

working_directory: ~/ocaml-tree-sitter
steps:
Expand Down Expand Up @@ -56,7 +59,7 @@ jobs:
docker:
- image: returntocorp/ocaml:ubuntu
# See earlier note about memory requirements.
resource_class: xlarge
# resource_class: xlarge
working_directory: ~/ocaml-tree-sitter
steps:
- checkout
Expand All @@ -81,7 +84,7 @@ jobs:
stat2:
docker:
- image: returntocorp/ocaml:ubuntu
resource_class: xlarge
# resource_class: xlarge
working_directory: ~/ocaml-tree-sitter
steps:
- checkout
Expand Down
7 changes: 4 additions & 3 deletions lang/semgrep-grammars/src/semgrep-ocaml/prep
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ set -eu -o pipefail

mkdir -p src

rm -f src/scanner.cc
cat ../tree-sitter-ocaml/ocaml/src/scanner.cc \
rm -f src/scanner.c
cat ../tree-sitter-ocaml/ocaml/src/scanner.c \
| sed -e 's:"../../common/scanner.h":"scanner.h":' \
> src/scanner.cc
> src/scanner.c

(
cd src
ln -sf ../../tree-sitter-ocaml/common/scanner.h .
)


mkdir -p test/corpus
(
cd test/corpus
Expand Down
2 changes: 1 addition & 1 deletion lang/semgrep-grammars/src/tree-sitter-ocaml
Submodule tree-sitter-ocaml updated 46 files
+1 −0 .clang-format
+8 −3 .gitattributes
+45 −3 .github/workflows/build.yml
+51 −0 .github/workflows/publish.yml
+14 −2 .gitignore
+7 −7 Cargo.toml
+38 −0 Package.swift
+4 −4 README.md
+42 −0 bindings/rust/README.md
+5 −12 bindings/rust/build.rs
+66 −24 bindings/rust/lib.rs
+17 −0 bindings/swift/TreeSitterOCaml/ocaml.h
+43 −0 bindings/swift/TreeSitterOCamlTests/TreeSitterOCamlTests.swift
+340 −221 common/scanner.h
+5 −1 interface/corpus/module-specification.txt
+645 −805 interface/src/grammar.json
+430 −856 interface/src/node-types.json
+946,286 −361,868 interface/src/parser.c
+26 −0 interface/src/scanner.c
+0 −29 interface/src/scanner.cc
+3 −2 interface/src/tree_sitter/parser.h
+2 −0 ocaml/corpus/attributes.txt
+3 −1 ocaml/corpus/comments.txt
+55 −27 ocaml/corpus/expressions.txt
+3 −3 ocaml/corpus/module-implementation.txt
+17 −1 ocaml/corpus/module-items.txt
+7 −1 ocaml/corpus/module-types.txt
+7 −3 ocaml/corpus/patterns.txt
+42 −2 ocaml/corpus/types.txt
+288 −362 ocaml/grammar.js
+645 −805 ocaml/src/grammar.json
+429 −815 ocaml/src/node-types.json
+1,056,901 −419,420 ocaml/src/parser.c
+27 −0 ocaml/src/scanner.c
+0 −29 ocaml/src/scanner.cc
+3 −2 ocaml/src/tree_sitter/parser.h
+3 −3 package.json
+17 −11 queries/highlights.scm
+14 −12 queries/tags.scm
+16 −18 script/known_failures.txt
+21 −17 script/parse-examples
+1 −1 test/highlight/attributes.ml
+4 −0 test/highlight/constants.ml
+11 −11 test/highlight/modules.ml
+2 −3 test/highlight/operators.ml
+4 −3 test/highlight/types.ml
Loading