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

Commit bae5cc2

Browse files
authored
Merge pull request #145 from lzutao/async-kw
Add syntax highlighting for async/await/try keyword
2 parents 7903be7 + 7d59e2a commit bae5cc2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

grammars/rust.cson

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@
288288
{
289289
'comment': 'Control keyword'
290290
'name': 'keyword.control.rust'
291-
'match': '\\b(break|continue|else|if|in|for|loop|match|return|while)\\b'
291+
'match': '\\b(async|await|break|continue|else|if|in|for|loop|match|return|try|while)\\b'
292292
}
293293
{
294294
'comment': 'Keyword'

spec/rust-spec.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ describe 'Rust grammar', ->
294294
#
295295

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

0 commit comments

Comments
 (0)