Skip to content

Improvements to rest highlighting #360

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

Merged
merged 1 commit into from
Apr 4, 2016

Conversation

amadeus
Copy link
Collaborator

@amadeus amadeus commented Apr 4, 2016

  • Added higher specificity to the dots in the spread declaration
  • Linked the dots to Noise

@davidchambers
Copy link
Collaborator

The proper term should be spread, not rest

myFunction(...iterableObj)  // spread
function(a, b, ...theArgs) {  // rest
  // ...
}

To which of the parenthesized sections above does jsFuncArgs apply?

@amadeus
Copy link
Collaborator Author

amadeus commented Apr 4, 2016

You're correct, I misread the spec, I'll rename them back, fix up this PR shortly.

@amadeus amadeus force-pushed the update-spread-matching branch from 3923f9e to bfe2920 Compare April 4, 2016 05:13
@amadeus amadeus changed the title Improvements to spread highlighting Improvements to rest highlighting Apr 4, 2016
@amadeus amadeus force-pushed the update-spread-matching branch from bfe2920 to defad41 Compare April 4, 2016 05:14
@amadeus
Copy link
Collaborator Author

amadeus commented Apr 4, 2016

Fixed.

@amadeus amadeus force-pushed the update-spread-matching branch from defad41 to aac12e4 Compare April 4, 2016 05:16
@@ -219,7 +219,8 @@ syntax match jsGenerator contained '\*' nextgroup=jsFuncName skipwhite
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest,jsAssignmentExpr,jsComment,jsLineComment nextgroup=jsFuncBlock keepend skipwhite skipempty
syntax match jsFuncArgCommas contained ','
syntax match jsFuncArgRest contained /\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\))/
syntax match jsFuncArgRest contained /\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\))/ contains=jsFuncArgRestDots
Copy link
Collaborator

Choose a reason for hiding this comment

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

➡️ ➡️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, not sure what you mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nevermind, you meant whitespace alignment, fixed

* Added higher specificity to the dots in the spread declaration
@amadeus amadeus force-pushed the update-spread-matching branch from aac12e4 to 7323233 Compare April 4, 2016 06:03
@davidchambers
Copy link
Collaborator

LGTM

@amadeus amadeus merged commit 22f9a02 into pangloss:develop Apr 4, 2016
@amadeus amadeus deleted the update-spread-matching branch April 4, 2016 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants