@@ -0,0 +1,271 @@
3+# http://www.sublimetext.com/docs/3/syntax.html
5+comment: "CoffeeScript Syntax: version 1"
11+first_line_match: ^#!.*\bcoffee
15+ - match: '(\([^()]*?\))\s*([=-]>)'
16+ comment: "match stuff like: a -> …"
17+ scope: meta.inline.function.coffee
19+ 1: variable.parameter.function.coffee
20+ 2: storage.type.function.coffee
21+ - match: (new)\s+(\w+(?:\.\w*)*)
22+ scope: meta.class.instance.constructor
24+ 1: keyword.operator.new.coffee
25+ 2: support.class.coffee
28+ 0: punctuation.definition.string.begin.coffee
30+ - meta_scope: string.quoted.heredoc.coffee
33+ 0: punctuation.definition.string.end.coffee
37+ 0: punctuation.definition.string.begin.coffee
39+ - meta_scope: string.quoted.double.heredoc.coffee
42+ 0: punctuation.definition.string.end.coffee
45+ scope: constant.character.escape.coffee
46+ - include: interpolated_coffee
49+ 0: punctuation.definition.string.begin.coffee
51+ - meta_scope: string.quoted.script.coffee
54+ 0: punctuation.definition.string.end.coffee
56+ - match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
57+ scope: constant.character.escape.coffee
58+ - match: (?<!#)###(?!#)
60+ 0: punctuation.definition.comment.coffee
62+ - meta_scope: comment.block.coffee
63+ - match: '###(?:[ \t]*\n)'
65+ 0: punctuation.definition.comment.coffee
68+ scope: storage.type.annotation.coffeescript
69+ - match: '(#)(?!\{).*$\n?'
70+ scope: comment.line.number-sign.coffee
72+ 1: punctuation.definition.comment.coffee
75+ - meta_scope: string.regexp.coffee
76+ - match: "/{3}[imgy]{0,4}"
78+ - include: interpolated_coffee
79+ - include: embedded_comment
80+ - match: '/(?![\s=/*+{}?]).*?[^\\]/[igmy]{0,4}(?![a-zA-Z0-9])'
81+ scope: string.regexp.coffee
85+ break|by|catch|continue|else|finally|for|in|of|if|return|switch|
86+ then|throw|try|unless|when|while|until|loop|do|(?<=for)\s+own
88+ scope: keyword.control.coffee
91+ and=|or=|!|%|&|\^|\*|\/|(\-)?\-(?!>)|\+\+|\+|~|==|=(?!>)|!=|<=|>=|<<=|>>=|
92+ >>>=|<>|<|>|!|&&|\.\.(\.)?|\?|\||\|\||\:|\*=|(?<!\()/=|%=|\+=|\-=|&=|
93+ \^=|\b(?<![\.\$])(instanceof|new|delete|typeof|and|or|is|isnt|not|super)\b
94+ scope: keyword.operator.coffee
95+ - match: '([a-zA-Z\$_](\w|\$|\.)*\s*(?!\::)((:)|(=[^=]))(?!(\s*\(.*\))?\s*((=|-)>)))'
96+ scope: variable.assignment.coffee
98+ 1: variable.assignment.coffee
99+ 4: punctuation.separator.key-value
100+ 5: keyword.operator.coffee
101+ - match: '(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])'
103+ 0: keyword.operator.coffee
105+ - meta_scope: meta.variable.assignment.destructured.coffee
106+ - match: '([\]\}]\s*[:=])'
108+ 0: keyword.operator.coffee
110+ - include: variable_name
111+ - include: instance_variable
112+ - include: single_quoted_string
113+ - include: double_quoted_string
120+ [a-zA-Z\$_](\w|\$|:|\.)*\s*
121+ (?=[:=](\s*\(.*\))?\s*([=-]>))
123+ scope: meta.function.coffee
125+ 2: entity.name.function.coffee
126+ 3: entity.name.function.coffee
127+ 4: variable.parameter.function.coffee
128+ 5: storage.type.function.coffee
129+ - match: ^\s*(describe|it|app\.(get|post|put|all|del|delete))
130+ comment: Show well-known functions from Express and Mocha in Go To Symbol view
132+ - meta_scope: meta.function.symbols.coffee
137+ scope: storage.type.function.coffee
138+ - match: '\b(?<!\.)(true|on|yes)(?!\s*[:=])\b'
139+ scope: constant.language.boolean.true.coffee
140+ - match: '\b(?<!\.)(false|off|no)(?!\s*[:=])\b'
141+ scope: constant.language.boolean.false.coffee
142+ - match: '\b(?<!\.)null(?!\s*[:=])\b'
143+ scope: constant.language.null.coffee
144+ - match: '\b(?<!\.)(this|extends)(?!\s*[:=])\b'
145+ scope: variable.language.coffee
146+ - match: '(class\b)\s+(@?[a-zA-Z\$_][\w\.]*)?(?:\s+(extends)\s+(@?[a-zA-Z\$\._][\w\.]*))?'
147+ scope: meta.class.coffee
149+ 1: storage.type.class.coffee
150+ 2: entity.name.type.class.coffee
151+ 3: keyword.control.inheritance.coffee
152+ 4: entity.other.inherited-class.coffee
153+ - match: \b(debugger|\\)\b
154+ scope: keyword.other.coffee
157+ Array|ArrayBuffer|Blob|Boolean|Date|document|event|Function|
158+ Int(8|16|32|64)Array|Math|Map|Number|
159+ Object|Proxy|RegExp|Set|String|WeakMap|
160+ window|Uint(8|16|32|64)Array|XMLHttpRequest
162+ scope: support.class.coffee
163+ - match: ((?<=console\.)(debug|warn|info|log|error|time|timeEnd|assert))\b
164+ scope: support.function.console.coffee
167+ decodeURI(Component)?|encodeURI(Component)?|eval|parse(Float|Int)|require
169+ scope: support.function.coffee
172+ apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf|
173+ isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push|
174+ reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String|
177+ scope: support.function.method.array.coffee
182+ scope: support.function.static.array.coffee
185+ create|definePropert(ies|y)|freeze|getOwnProperty(Descriptors?|Names)|
186+ getProperty(Descriptor|Names)|getPrototypeOf|is(Extensible|Frozen|Sealed)?|
187+ isnt|keys|preventExtensions|seal
189+ scope: support.function.static.object.coffee
192+ abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|
193+ hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|
196+ scope: support.function.static.math.coffee
199+ is(Finite|Integer|NaN)|toInteger
201+ scope: support.function.static.number.coffee
202+ - match: \b(Infinity|NaN|undefined)\b
203+ scope: constant.language.coffee
205+ scope: punctuation.terminator.statement.coffee
207+ scope: meta.delimiter.object.comma.coffee
209+ scope: meta.delimiter.method.period.coffee
211+ scope: meta.brace.curly.coffee
213+ scope: meta.brace.round.coffee
215+ scope: meta.brace.square.coffee
216+ - include: instance_variable
217+ - include: single_quoted_string
218+ - include: double_quoted_string
220+ double_quoted_string:
223+ 0: punctuation.definition.string.begin.coffee
225+ - meta_scope: string.quoted.double.coffee
228+ 0: punctuation.definition.string.end.coffee
230+ - match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)'
231+ scope: constant.character.escape.coffee
232+ - include: interpolated_coffee
234+ - match: (?<!\\)(#).*$\n?
235+ scope: comment.line.number-sign.coffee
237+ 1: punctuation.definition.comment.coffee
239+ - match: '(@)([a-zA-Z_\$]\w*)?'
240+ scope: variable.other.readwrite.instance.coffee
241+ interpolated_coffee:
244+ 0: punctuation.section.embedded.coffee
246+ - meta_scope: source.coffee.embedded.source
249+ 0: punctuation.section.embedded.coffee
253+ - match: '(?<!\$)\b((0([box])[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?(e[+\-]?[0-9]+)?))\b'
254+ scope: constant.numeric.coffee
255+ single_quoted_string:
258+ 0: punctuation.definition.string.begin.coffee
260+ - meta_scope: string.quoted.single.coffee
263+ 0: punctuation.definition.string.end.coffee
265+ - match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)'
266+ scope: constant.character.escape.coffee
268+ - match: '([a-zA-Z\$_]\w*(\.\w+)*)'
269+ scope: variable.assignment.coffee
271+ 1: variable.assignment.coffee