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

Commit

Permalink
Remove redo from Tree-sitter grammar until we can get it working
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonrudolph committed Aug 27, 2019
1 parent e79030c commit 32a486f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions grammars/tree-sitter-ruby.cson
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ scopes:
scopes: 'keyword.other.special-method'
}
{
match: '^(block_given\?|iterator\?|alias_method|redo)'
match: '^(block_given\?|iterator\?|alias_method)'
scopes: 'keyword.control'
}
]
Expand All @@ -167,7 +167,7 @@ scopes:
'method_call > identifier:nth-child(0)': [
{exact: 'require', scopes: 'support.function'}
{match: '^(public|protected|private)$', scopes: 'keyword.other.special-method'}
{match: '^(block_given\?|iterator\?|alias_method|redo)', scopes: 'keyword.control'}
{match: '^(block_given\?|iterator\?|alias_method)', scopes: 'keyword.control'}
'entity.name.function'
]

Expand Down
7 changes: 2 additions & 5 deletions spec/tree-sitter-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,16 @@ describe('Tree-sitter Ruby grammar', () => {
const editor = await atom.workspace.open('foo.rb')

editor.setText(dedent`
undef
redo
super
undef foo
`)

expect(editor.scopeDescriptorForBufferPosition([0, 0]).toString()).toBe(
'.source.ruby .keyword.control'
)

expect(editor.scopeDescriptorForBufferPosition([1, 0]).toString()).toBe(
'.source.ruby .keyword.control'
)
expect(editor.scopeDescriptorForBufferPosition([2, 0]).toString()).toBe(
'.source.ruby .keyword.control'
)
})
})

0 comments on commit 32a486f

Please sign in to comment.