Skip to content

Commit 84d44cb

Browse files
committed
Add yield from
Supersedes and closes #213
1 parent f7d1772 commit 84d44cb

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CoffeeScript.sublime-syntax

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ contexts:
7878
- match: |-
7979
(?x)
8080
\b(?<![\.\$])(
81-
break|by|catch|continue|else|finally|for|in|of|if|return|yield|switch|
82-
then|throw|try|unless|when|while|until|loop|do|(?<=for)\s+own
81+
break|by|catch|continue|else|finally|for(?:\s+own)?|in|of|if|return|yield(?:\s+from)?|switch|
82+
then|throw|try|unless|when|while|until|loop|do
8383
)(?!\s*:)\b
8484
scope: keyword.control.coffee
8585
- match: |-

tests/syntax_test_scope.coffee

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@ class App.Router extends Snakeskin.Router
1818
# ^^ storage.type.function.coffee
1919
"Hello"
2020
# ^^^^^^^ meta.string.coffee string.quoted.double.coffee
21+
22+
23+
keywords: ->
24+
yield @foo
25+
# ^^^^^ keyword.control.coffee
26+
# ^^^^ variable.other.readwrite.instance.coffee
27+
28+
yield from @foo
29+
# ^^^^^^^^^^ keyword.control.coffee
30+
# ^^^^ variable.other.readwrite.instance.coffee

0 commit comments

Comments
 (0)