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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add `next` keyword to Tree Sitter's keyword.control scope #262

merged 1 commit into from Apr 2, 2019


None yet
3 participants
Copy link

commented Feb 12, 2019


  • 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 adds the ruby next keyword to the list of keywords in the keyword.control scope. I actually noticed several missing keywords compared to the old grammar

'match': '(?<!\\.)\\b(alias|alias_method|break|next|redo|retry|return|super|undef|yield)\\b(?![?!])|\\bdefined\\?|\\b(block_given|iterator)\\?'
'name': 'keyword.control.pseudo-method.ruby'

But I only really wanted the next keyword at the moment, and didn't want to hurt this PR's chances of getting merged by including other keywords. You can see that the new grammar is missing redo, super, undef, block_given?, defined?, among others. I did just notice that this excerpt is from a different scope, but I would still consider some of these to be control keywords.

Edit by @rsese to add a screenshot and copy/paste code

(1..10).each do |i|
  if i % 2 == 0
   puts "even"
  puts i

Missing scope:


Alternate Designs

I did not consider any alternate designs.



Possible Drawbacks


Applicable Issues



This comment has been minimized.

Copy link

commented Feb 13, 2019

Thanks! Someone from the team will take a look as soon as they can.

@rsese rsese assigned rsese and unassigned rsese Feb 13, 2019

@jasonrudolph jasonrudolph merged commit 2d1e477 into atom:master Apr 2, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

commented Apr 2, 2019

Thanks for this, @willcosgrove! 馃嵃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.