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

chore: named ellipses in java #465

Merged
merged 2 commits into from
Jan 23, 2024
Merged

Conversation

brandonspark
Copy link
Contributor

@brandonspark brandonspark commented Dec 19, 2023

As title.

In particular, this PR allows named ellipses to be used as statements, expressions, and parameters.

Security

  • Change has no security implications (otherwise, ping the security team)

@brandonspark brandonspark requested a review from a team as a code owner December 19, 2023 23:35
@brandonspark brandonspark requested review from IagoAbal and nmote and removed request for a team December 19, 2023 23:35
@brandonspark brandonspark changed the title chore: allow named ellipsis as java param chore: named ellipses in java Dec 19, 2023
@brandonspark brandonspark requested a review from aryx December 19, 2023 23:39
@@ -185,7 +186,7 @@ class $X {
(identifier))))))))

================================================================================
Metavariable ellipsis parameter
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we do actually normally call this feature "metavariable ellipsis," not "named ellipsis."

@@ -45,32 +45,38 @@ module.exports = grammar(base_grammar, {
),

semgrep_ellipsis: $ => '...',
semgrep_named_ellipsis: $ => /\$\.\.\.[A-Z_][A-Z_0-9]*/,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we use metavar_ellipsis in other context rather than named_ellipsis.

@brandonspark
Copy link
Contributor Author

oops, semgrep/semgrep#9491 is already merged

@brandonspark brandonspark merged commit 326025a into main Jan 23, 2024
3 checks passed
@brandonspark brandonspark deleted the brandon/java-named-ellipsis-param branch January 23, 2024 16:38
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.

3 participants