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

Commit

Permalink
Add try keyword to spec and grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed May 18, 2019
1 parent e9ae832 commit 7d59e2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grammars/rust.cson
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
{
'comment': 'Control keyword'
'name': 'keyword.control.rust'
'match': '\\b(async|await|break|continue|else|if|in|for|loop|match|return|while)\\b'
'match': '\\b(async|await|break|continue|else|if|in|for|loop|match|return|try|while)\\b'
}
{
'comment': 'Keyword'
Expand Down
2 changes: 1 addition & 1 deletion spec/rust-spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ describe 'Rust grammar', ->
#

it 'tokenizes control keywords', ->
for t in ['async', 'await', 'break', 'continue', 'else', 'if', 'in', 'for', 'loop', 'match', 'return', 'while']
for t in ['async', 'await', 'break', 'continue', 'else', 'if', 'in', 'for', 'loop', 'match', 'return', 'try', 'while']
{tokens} = grammar.tokenizeLine("text #{t} text")
expect(tokens[0]).toEqual value: 'text ', scopes: ['source.rust']
expect(tokens[1]).toEqual value: t, scopes: ['source.rust', 'keyword.control.rust']
Expand Down

0 comments on commit 7d59e2a

Please sign in to comment.