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

Rust: Support top-level statements #2910

Merged
merged 10 commits into from Apr 12, 2021

Conversation

amietn
Copy link
Contributor

@amietn amietn commented Apr 9, 2021

As discussed on Slack, the crate::foo(); unit test in expression.rs currently fails.

Other PR: semgrep/ocaml-tree-sitter-semgrep#177

PR checklist:

  • changelog is up to date

@aryx aryx self-requested a review April 9, 2021 13:47
@aryx
Copy link
Collaborator

aryx commented Apr 9, 2021

Once you modify the rust grammar, you need to pull the updated generated ocaml code for it in the semgrep/semgrep-core/src/tree-sitter-lang/semgrep-rust/ (it's a submodule that is automatically updated from the latest rust semgrep grammar).

.gitmodules Outdated
@@ -36,7 +36,7 @@
url = https://github.com/returntocorp/semgrep-ruby
[submodule "semgrep-core/tree-sitter-lang/semgrep-rust"]
path = semgrep-core/src/tree-sitter-lang/semgrep-rust
url = https://github.com/returntocorp/semgrep-rust
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you revert this back to use our semgrep-rust?

Copy link
Collaborator

@aryx aryx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! Thanks.

@aryx aryx merged commit 3bf47db into semgrep:develop Apr 12, 2021
@amietn amietn mentioned this pull request May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants