Skip to content

Commit 0083361

Browse files
committed
1 parent 70efe34 commit 0083361

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

CoffeeScript.sublime-syntax

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,22 @@ contexts:
434434
2: punctuation.accessor.dot.coffee
435435
- match: '{{identifier}}'
436436
scope: support.class.coffee
437-
pop: 1
437+
set: maybe-class-arguments
438+
- include: else-pop
439+
440+
maybe-class-arguments:
441+
- match: \(
442+
scope: punctuation.section.group.begin.coffee
443+
set: class-arguments-body
438444
- include: else-pop
439445

446+
class-arguments-body:
447+
- meta_scope: meta.group.coffee
448+
- match: \)
449+
scope: punctuation.section.group.end.coffee
450+
pop: 1
451+
- include: script
452+
440453
###[ OPERATORS ]##############################################################
441454

442455
punctuations:

tests/syntax_test_scope.coffee

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,21 @@ class App.Router extends Snakeskin.Router
284284
# ^ keyword.operator.assignment.coffee
285285
# ^^^ keyword.operator.object.new.coffee
286286
# ^^^^^ support.class.coffee
287+
# ^ punctuation.section.group.begin.coffee
288+
# ^ punctuation.section.group.end.coffee
287289

288-
try: new Class();
290+
try: new Class("Unknown sort: #{info.type}");
289291
# ^^^ variable.other.readwrite.coffee
290292
# ^ keyword.operator.assignment.coffee
291293
# ^^^ keyword.operator.object.new.coffee
292294
# ^^^^^ support.class.coffee
295+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.group.coffee
296+
# ^ punctuation.section.group.begin.coffee
297+
# ^^^^^^^^^^^^^^^ meta.string.coffee string.quoted.double.coffee - meta.interpolation
298+
# ^^^^^^^^^^^^ meta.string.coffee meta.embedded.coffee source.coffee.embedded.source
299+
# ^ meta.string.coffee string.quoted.double.coffee - meta.interpolation
300+
# ^ punctuation.section.group.end.coffee
301+
# ^ punctuation.terminator.statement.coffee
293302

294303
###[ KEYWORDS ]################################################################
295304

0 commit comments

Comments
 (0)