%YAML 1.2 --- # http://www.sublimetext.com/docs/3/syntax.html name: CoffeeScript comment: "CoffeeScript Syntax: version 1" file_extensions: - coffee - Cakefile - coffee.erb - cson first_line_match: ^#!.*\bcoffee scope: source.coffee contexts: main: - match: '(\([^()]*?\))\s*([=-]>)' comment: "match stuff like: a -> …" scope: meta.inline.function.coffee captures: 1: variable.parameter.function.coffee 2: storage.type.function.coffee - match: (new)\s+(\w+(?:\.\w*)*) scope: meta.class.instance.constructor captures: 1: keyword.operator.new.coffee 2: support.class.coffee - match: "'''" captures: 0: punctuation.definition.string.begin.coffee push: - meta_scope: string.quoted.heredoc.coffee - match: "'''" captures: 0: punctuation.definition.string.end.coffee pop: true - match: '"""' captures: 0: punctuation.definition.string.begin.coffee push: - meta_scope: string.quoted.double.heredoc.coffee - match: '"""' captures: 0: punctuation.definition.string.end.coffee pop: true - match: \\. scope: constant.character.escape.coffee - include: interpolated_coffee - match: "`" captures: 0: punctuation.definition.string.begin.coffee push: - meta_scope: string.quoted.script.coffee - match: "`" captures: 0: punctuation.definition.string.end.coffee pop: true - match: '\\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' scope: constant.character.escape.coffee - match: (?)|\+\+|\+|~|==|=(?!>)|!=|<=|>=|<<=|>>=| >>>=|<>|<|>|!|&&|\.\.(\.)?|\?|\||\|\||\:|\*=|(?)))' scope: variable.assignment.coffee captures: 1: variable.assignment.coffee 4: punctuation.separator.key-value 5: keyword.operator.coffee - match: '(?<=\s|^)([\[\{])(?=.*?[\]\}]\s+[:=])' captures: 0: keyword.operator.coffee push: - meta_scope: meta.variable.assignment.destructured.coffee - match: '([\]\}]\s*[:=])' captures: 0: keyword.operator.coffee pop: true - include: variable_name - include: instance_variable - include: single_quoted_string - include: double_quoted_string - include: numeric - match: |- (?x) (\s*) (?=[a-zA-Z\$_]) ( [a-zA-Z\$_](\w|\$|:|\.)*\s* (?=[:=](\s*\(.*\))?\s*([=-]>)) ) scope: meta.function.coffee captures: 2: entity.name.function.coffee 3: entity.name.function.coffee 4: variable.parameter.function.coffee 5: storage.type.function.coffee - match: ^\s*(describe|it|app\.(get|post|put|all|del|delete)) comment: Show well-known functions from Express and Mocha in Go To Symbol view push: - meta_scope: meta.function.symbols.coffee - match: $ pop: true - include: main - match: "[=-]>" scope: storage.type.function.coffee - match: '\b(?