Skip to content

Commit

Permalink
[JavaScript] Handle single-line ES6 arrow functions inside of a funct…
Browse files Browse the repository at this point in the history
…ion call
  • Loading branch information
wbond committed Feb 25, 2016
1 parent 89110d0 commit f8562c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion JavaScript/JavaScript.sublime-syntax
Expand Up @@ -721,7 +721,7 @@ contexts:
1: storage.type.function.arrow.js
set:
- meta_content_scope: meta.block.js
- match: \n
- match: '(?=\n|\))'
pop: true
- include: expressions
- match: '\b(async)\b\s*'
Expand Down
3 changes: 3 additions & 0 deletions JavaScript/syntax_test_js.js
Expand Up @@ -417,6 +417,9 @@ sources.DOM
.status()
// ^ meta.function-call.method variable.function

return new Promise(resolve => preferenceObject.set({value}, resolve));
// ^ meta.function-call.constructor meta.brace.round

this.func()
// <- variable.language.this
self.func()
Expand Down

0 comments on commit f8562c8

Please sign in to comment.