Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Add varargs scope #130

Merged
merged 2 commits into from Mar 5, 2018
Merged

Add varargs scope #130

merged 2 commits into from Mar 5, 2018

Conversation

sadikovi
Copy link
Contributor

@sadikovi sadikovi commented Feb 20, 2018

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

This PR adds new scope for variable length arguments list denoted as ..., for example,

void func(String ... args) {
  // code
}

Name of the scope is punctuation.definition.parameters.varargs and it is added to the parameters list of patterns.

Tested manually on different code snippets and added unittest.

Alternate Designs

None were considered, since the change is fairly straightforward. I did change scope name for this to
punctuation.definition.parameters.varargs.java.

Benefits

Adds new scope for varargs.

Possible Drawbacks

Should not be any, change is fairly minor and only affects parameters list for functions and methods.

Applicable Issues

Closes #129

@sadikovi
Copy link
Contributor Author

@50Wliu @chbk would you mind reviewing this PR? Thanks!

},
{
'match': '\\.\\.\\.'
'name': 'punctuation.definition.parameters.varargs'
Copy link
Contributor

Choose a reason for hiding this comment

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

.java

@sadikovi
Copy link
Contributor Author

sadikovi commented Mar 5, 2018

@50Wliu I updated the scope name. Can you have a look again? Thanks!

@sadikovi sadikovi merged commit cfbfd32 into atom:master Mar 5, 2018
@sadikovi sadikovi deleted the vararg-scope branch March 5, 2018 23:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No scope on ellipsis
2 participants