{ "name": "CoffeeScript", "scopeName": "source.coffee", "patterns": [ { "name": "meta.class.instance.constructor.coffee", "match": "(new)\\s+(?:(?:(class)\\s+(\\w+(?:\\.\\w*)*)?)|(\\w+(?:\\.\\w*)*))", "captures": { "1": { "name": "keyword.operator.new.coffee" }, "2": { "name": "storage.type.class.coffee" }, "3": { "name": "entity.name.type.instance.coffee" }, "4": { "name": "entity.name.type.instance.coffee" } } }, { "name": "string.quoted.single.heredoc.coffee", "begin": "'''", "end": "'''", "patterns": [ { "name": "constant.character.escape.backslash.coffee", "match": "(\\\\).", "captures": { "1": { "name": "punctuation.definition.escape.backslash.coffee" } } } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.coffee" } } }, { "name": "string.quoted.double.heredoc.coffee", "begin": "\"\"\"", "end": "\"\"\"", "patterns": [ { "name": "constant.character.escape.backslash.coffee", "match": "(\\\\).", "captures": { "1": { "name": "punctuation.definition.escape.backslash.coffee" } } }, { "include": "#interpolated_coffee" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.coffee" } } }, { "name": "string.quoted.script.coffee", "match": "(`)(.*)(`)", "captures": { "1": { "name": "punctuation.definition.string.begin.coffee" }, "2": { "name": "source.js.embedded.coffee", "patterns": [ { "include": "source.js" } ] }, "3": { "name": "punctuation.definition.string.end.coffee" } } }, { "name": "comment.block.coffee", "begin": "(?\u003c!#)###(?!#)", "end": "###", "patterns": [ { "name": "storage.type.annotation.coffee", "match": "(?\u003c=^|\\s)@\\w*(?=\\s)" } ], "beginCaptures": { "0": { "name": "punctuation.definition.comment.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.coffee" } } }, { "name": "comment.line.number-sign.coffee", "begin": "#", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.coffee" } } }, { "name": "string.regexp.multiline.coffee", "begin": "///", "end": "(///)[gimuy]*", "patterns": [ { "include": "#heregexp" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.coffee" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.coffee" } } }, { "name": "string.regexp.coffee", "begin": "(?\u003c![\\w$])(/)(?=(?![/*+?])(.+)(/)[gimuy]*(?!\\s*[\\w$/(]))", "end": "(/)[gimuy]*(?!\\s*[\\w$/(])", "patterns": [ { "include": "source.js.regexp" } ], "beginCaptures": { "1": { "name": "punctuation.definition.string.begin.coffee" } }, "endCaptures": { "1": { "name": "punctuation.definition.string.end.coffee" } } }, { "name": "keyword.control.coffee", "match": "\\b(?\u003c![\\.\\$])(break|by|catch|continue|else|finally|for|in|of|if|return|switch|then|throw|try|unless|when|while|until|loop|do|export|import|default|from|as|yield|async|await|(?\u003c=for)\\s+own)(?!\\s*:)\\b" }, { "name": "keyword.operator.$1.coffee", "match": "\\b(?\u003c![\\.\\$])(delete|instanceof|new|typeof)(?!\\s*:)\\b" }, { "name": "keyword.reserved.coffee", "match": "\\b(?\u003c![\\.\\$])(case|function|var|void|with|const|let|enum|native|__hasProp|__extends|__slice|__bind|__indexOf|implements|interface|package|private|protected|public|static)(?!\\s*:)\\b" }, { "name": "meta.function.coffee", "begin": "(?x)\n(?\u003c=\\s|^)((@)?[a-zA-Z_$][\\w$]*)\n\\s*([:=])\\s*\n(?=(\\([^\\(\\)]*\\)\\s*)?[=-]\u003e)", "end": "[=-]\u003e", "patterns": [ { "include": "#function_params" } ], "beginCaptures": { "1": { "name": "entity.name.function.coffee" }, "2": { "name": "variable.other.readwrite.instance.coffee" }, "3": { "name": "keyword.operator.assignment.coffee" } }, "endCaptures": { "0": { "name": "storage.type.function.coffee" } } }, { "name": "meta.function.coffee", "begin": "(?x)\n(?\u003c=\\s|^)(?:((')([^']*?)('))|((\")([^\"]*?)(\")))\n\\s*([:=])\\s*\n(?=(\\([^\\(\\)]*\\)\\s*)?[=-]\u003e)", "end": "[=-]\u003e", "patterns": [ { "include": "#function_params" } ], "beginCaptures": { "1": { "name": "string.quoted.single.coffee" }, "2": { "name": "punctuation.definition.string.begin.coffee" }, "3": { "name": "entity.name.function.coffee" }, "4": { "name": "punctuation.definition.string.end.coffee" }, "5": { "name": "string.quoted.double.coffee" }, "6": { "name": "punctuation.definition.string.begin.coffee" }, "7": { "name": "entity.name.function.coffee" }, "8": { "name": "punctuation.definition.string.end.coffee" }, "9": { "name": "keyword.operator.assignment.coffee" } }, "endCaptures": { "0": { "name": "storage.type.function.coffee" } } }, { "name": "meta.function.inline.coffee", "begin": "(?=(\\([^\\(\\)]*\\)\\s*)?[=-]\u003e)", "end": "[=-]\u003e", "patterns": [ { "include": "#function_params" } ], "endCaptures": { "0": { "name": "storage.type.function.coffee" } } }, { "name": "meta.variable.assignment.destructured.object.coffee", "begin": "(?\u003c=\\s|^)({)(?=[^'\"#]+?}[\\s\\]}]*=)", "end": "}", "patterns": [ { "include": "$self" }, { "name": "variable.assignment.coffee", "match": "[a-zA-Z$_]\\w*" } ], "beginCaptures": { "1": { "name": "punctuation.definition.destructuring.begin.bracket.curly.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.destructuring.end.bracket.curly.coffee" } } }, { "name": "meta.variable.assignment.destructured.array.coffee", "begin": "(?\u003c=\\s|^)(\\[)(?=[^'\"#]+?\\][\\s\\]}]*=)", "end": "\\]", "patterns": [ { "include": "$self" }, { "name": "variable.assignment.coffee", "match": "[a-zA-Z$_]\\w*" } ], "beginCaptures": { "1": { "name": "punctuation.definition.destructuring.begin.bracket.square.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.destructuring.end.bracket.square.coffee" } } }, { "name": "constant.language.boolean.true.coffee", "match": "\\b(?\u003c!\\.|::)(true|on|yes)(?!\\s*[:=][^=])\\b" }, { "name": "constant.language.boolean.false.coffee", "match": "\\b(?\u003c!\\.|::)(false|off|no)(?!\\s*[:=][^=])\\b" }, { "name": "constant.language.null.coffee", "match": "\\b(?\u003c!\\.|::)null(?!\\s*[:=][^=])\\b" }, { "name": "variable.language.coffee", "match": "\\b(?\u003c!\\.|::)extends(?!\\s*[:=])\\b" }, { "name": "variable.language.$1.coffee", "match": "(?\u003c!\\.)\\b(?\u003c!\\$)(super|this|arguments)(?!\\s*[:=][^=]|\\$)\\b" }, { "name": "meta.class.coffee", "match": "(?\u003c=\\s|^|\\[|\\()(class)\\s+(extends)\\s+(@?[a-zA-Z\\$\\._][\\w\\.]*)", "captures": { "1": { "name": "storage.type.class.coffee" }, "2": { "name": "keyword.control.inheritance.coffee" }, "3": { "name": "entity.other.inherited-class.coffee" } } }, { "name": "meta.class.coffee", "match": "(?\u003c=\\s|^|\\[|\\()(class\\b)\\s+(@?[a-zA-Z\\$_][\\w\\.]*)?(?:\\s+(extends)\\s+(@?[a-zA-Z\\$\\._][\\w\\.]*))?", "captures": { "1": { "name": "storage.type.class.coffee" }, "2": { "name": "entity.name.type.class.coffee" }, "3": { "name": "keyword.control.inheritance.coffee" }, "4": { "name": "entity.other.inherited-class.coffee" } } }, { "name": "keyword.other.coffee", "match": "\\b(debugger|\\\\)\\b" }, { "name": "support.class.coffee", "match": "\\b(Array|ArrayBuffer|Blob|Boolean|Date|document|Function|Int(8|16|32|64)Array|Math|Map|Number|Object|Proxy|RegExp|Set|String|WeakMap|window|Uint(8|16|32|64)Array|XMLHttpRequest)\\b" }, { "name": "entity.name.type.object.coffee", "match": "\\b(console)\\b" }, { "name": "support.function.console.coffee", "match": "((?\u003c=console\\.)(debug|warn|info|log|error|time|timeEnd|assert))\\b" }, { "name": "support.function.method.array.coffee", "match": "((?\u003c=\\.)(apply|call|concat|every|filter|forEach|from|hasOwnProperty|indexOf|isPrototypeOf|join|lastIndexOf|map|of|pop|propertyIsEnumerable|push|reduce(Right)?|reverse|shift|slice|some|sort|splice|to(Locale)?String|unshift|valueOf))\\b" }, { "name": "support.function.static.array.coffee", "match": "((?\u003c=Array\\.)(isArray))\\b" }, { "name": "support.function.static.object.coffee", "match": "((?\u003c=Object\\.)(create|definePropert(ies|y)|freeze|getOwnProperty(Descriptors?|Names)|getProperty(Descriptor|Names)|getPrototypeOf|is(Extensible|Frozen|Sealed)?|isnt|keys|preventExtensions|seal))\\b" }, { "name": "support.function.static.math.coffee", "match": "((?\u003c=Math\\.)(abs|acos|acosh|asin|asinh|atan|atan2|atanh|ceil|cos|cosh|exp|expm1|floor|hypot|log|log10|log1p|log2|max|min|pow|random|round|sign|sin|sinh|sqrt|tan|tanh|trunc))\\b" }, { "name": "support.function.static.number.coffee", "match": "((?\u003c=Number\\.)(is(Finite|Integer|NaN)|toInteger))\\b" }, { "name": "support.variable.coffee", "match": "(?\u003c!\\.)\\b(module|exports|__filename|__dirname|global|process)(?!\\s*:)\\b" }, { "name": "constant.language.coffee", "match": "\\b(Infinity|NaN|undefined)\\b" }, { "include": "#operators" }, { "include": "#method_calls" }, { "include": "#function_calls" }, { "include": "#numbers" }, { "include": "#objects" }, { "include": "#properties" }, { "name": "keyword.operator.prototype.coffee", "match": "::" }, { "name": "invalid.illegal.identifier.coffee", "match": "(?\u003c!\\$)\\b[0-9]+[\\w$]*" }, { "name": "punctuation.terminator.statement.coffee", "match": ";" }, { "name": "punctuation.separator.delimiter.coffee", "match": "," }, { "begin": "{", "end": "}", "patterns": [ { "include": "$self" } ], "beginCaptures": { "0": { "name": "meta.brace.curly.coffee" } }, "endCaptures": { "0": { "name": "meta.brace.curly.coffee" } } }, { "begin": "\\[", "end": "\\]", "patterns": [ { "name": "keyword.operator.slice.exclusive.coffee", "match": "(?\u003c!\\.)\\.{3}" }, { "name": "keyword.operator.slice.inclusive.coffee", "match": "(?\u003c!\\.)\\.{2}" }, { "include": "$self" } ], "beginCaptures": { "0": { "name": "punctuation.definition.array.begin.bracket.square.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.array.end.bracket.square.coffee" } } }, { "begin": "\\(", "end": "\\)", "patterns": [ { "include": "$self" } ], "beginCaptures": { "0": { "name": "meta.brace.round.coffee" } }, "endCaptures": { "0": { "name": "meta.brace.round.coffee" } } }, { "include": "#instance_variable" }, { "include": "#single_quoted_string" }, { "include": "#double_quoted_string" } ], "repository": { "arguments": { "patterns": [ { "name": "meta.arguments.coffee", "begin": "\\(", "end": "\\)", "patterns": [ { "include": "$self" } ], "beginCaptures": { "0": { "name": "punctuation.definition.arguments.begin.bracket.round.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.arguments.end.bracket.round.coffee" } } }, { "name": "meta.arguments.coffee", "begin": "(?=(@|@?[\\w$]+|[=-]\u003e|\\-\\d|\\[|{|\"|'))", "end": "(?=\\s*(?\u003c![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))|(?=\\s*(}|\\]|\\)|#|$))", "patterns": [ { "include": "$self" } ] } ] }, "double_quoted_string": { "patterns": [ { "name": "string.quoted.double.coffee", "begin": "\"", "end": "\"", "patterns": [ { "name": "constant.character.escape.backslash.coffee", "match": "(\\\\)(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)", "captures": { "1": { "name": "punctuation.definition.escape.backslash.coffee" } } }, { "include": "#interpolated_coffee" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.coffee" } } } ] }, "embedded_comment": { "patterns": [ { "name": "comment.line.number-sign.coffee", "match": "(?\u003c!\\\\)(#).*$\\n?", "captures": { "1": { "name": "punctuation.definition.comment.coffee" } } } ] }, "function_calls": { "patterns": [ { "name": "meta.function-call.coffee", "begin": "(@)?([\\w$]+)(?=\\()", "end": "(?\u003c=\\))", "patterns": [ { "include": "#arguments" } ], "beginCaptures": { "1": { "name": "variable.other.readwrite.instance.coffee" }, "2": { "patterns": [ { "include": "#function_names" } ] } } }, { "name": "meta.function-call.coffee", "begin": "(?x)\n(@)?([\\w$]+)\n\\s*\n(?=\\s+(?!(?\u003c![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))(?=(@?[\\w$]+|[=-]\u003e|\\-\\d|\\[|{|\"|')))", "end": "(?=\\s*(?\u003c![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))|(?=\\s*(}|\\]|\\)|#|$))", "patterns": [ { "include": "#arguments" } ], "beginCaptures": { "1": { "name": "variable.other.readwrite.instance.coffee" }, "2": { "patterns": [ { "include": "#function_names" } ] } } } ] }, "function_names": { "patterns": [ { "name": "support.function.coffee", "match": "(?x)\n\\b(isNaN|isFinite|eval|uneval|parseInt|parseFloat|decodeURI|\ndecodeURIComponent|encodeURI|encodeURIComponent|escape|unescape|\nrequire|set(Interval|Timeout)|clear(Interval|Timeout))\\b" }, { "name": "entity.name.function.coffee", "match": "[a-zA-Z_$][\\w$]*" }, { "name": "invalid.illegal.identifier.coffee", "match": "\\d[\\w$]*" } ] }, "function_params": { "patterns": [ { "name": "meta.parameters.coffee", "begin": "\\(", "end": "\\)", "patterns": [ { "match": "([a-zA-Z_$][\\w$]*)(\\.\\.\\.)?", "captures": { "1": { "name": "variable.parameter.function.coffee" }, "2": { "name": "keyword.operator.splat.coffee" } } }, { "match": "(@(?:[a-zA-Z_$][\\w$]*)?)(\\.\\.\\.)?", "captures": { "1": { "name": "variable.parameter.function.readwrite.instance.coffee" }, "2": { "name": "keyword.operator.splat.coffee" } } }, { "include": "$self" } ], "beginCaptures": { "0": { "name": "punctuation.definition.parameters.begin.bracket.round.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.parameters.end.bracket.round.coffee" } } } ] }, "heregexp": { "patterns": [ { "name": "keyword.control.anchor.regexp", "match": "\\\\[bB]|\\^|\\$" }, { "name": "keyword.other.back-reference.regexp", "match": "\\\\[1-9]\\d*" }, { "name": "keyword.operator.quantifier.regexp", "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??" }, { "name": "keyword.operator.or.regexp", "match": "\\|" }, { "name": "meta.group.assertion.regexp", "begin": "(\\()((\\?=)|(\\?!))", "end": "(\\))", "patterns": [ { "include": "#heregexp" } ], "beginCaptures": { "1": { "name": "punctuation.definition.group.regexp" }, "3": { "name": "meta.assertion.look-ahead.regexp" }, "4": { "name": "meta.assertion.negative-look-ahead.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.group.regexp" } } }, { "name": "meta.group.regexp", "begin": "\\((\\?:)?", "end": "\\)", "patterns": [ { "include": "#heregexp" } ], "beginCaptures": { "0": { "name": "punctuation.definition.group.regexp" } }, "endCaptures": { "0": { "name": "punctuation.definition.group.regexp" } } }, { "name": "constant.other.character-class.set.regexp", "begin": "(\\[)(\\^)?", "end": "(\\])", "patterns": [ { "name": "constant.other.character-class.range.regexp", "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))", "captures": { "1": { "name": "constant.character.numeric.regexp" }, "2": { "name": "constant.character.control.regexp" }, "3": { "name": "constant.character.escape.backslash.regexp" }, "4": { "name": "constant.character.numeric.regexp" }, "5": { "name": "constant.character.control.regexp" }, "6": { "name": "constant.character.escape.backslash.regexp" } } }, { "include": "#regex-character-class" } ], "beginCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" }, "2": { "name": "keyword.operator.negation.regexp" } }, "endCaptures": { "1": { "name": "punctuation.definition.character-class.regexp" } } }, { "include": "#regex-character-class" }, { "include": "#interpolated_coffee" }, { "include": "#embedded_comment" } ] }, "instance_variable": { "patterns": [ { "name": "variable.other.readwrite.instance.coffee", "match": "(@)([a-zA-Z_\\$]\\w*)?" } ] }, "interpolated_coffee": { "patterns": [ { "name": "source.coffee.embedded.source", "begin": "\\#\\{", "end": "\\}", "patterns": [ { "include": "$self" } ], "captures": { "0": { "name": "punctuation.section.embedded.coffee" } } } ] }, "method_calls": { "patterns": [ { "name": "meta.method-call.coffee", "begin": "(?:(\\.)|(::))\\s*([\\w$]+)\\s*(?=\\()", "end": "(?\u003c=\\))", "patterns": [ { "include": "#arguments" } ], "beginCaptures": { "1": { "name": "punctuation.separator.method.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "patterns": [ { "include": "#method_names" } ] } } }, { "name": "meta.method-call.coffee", "begin": "(?:(\\.)|(::))\\s*([\\w$]+)\\s*(?=\\s+(?!(?\u003c![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))(?=(@|@?[\\w$]+|[=-]\u003e|\\-\\d|\\[|{|\"|')))", "end": "(?=\\s*(?\u003c![\\w$])(of|in|then|is|isnt|and|or|for|else|when|if|unless|by|instanceof)(?![\\w$]))|(?=\\s*(}|\\]|\\)|#|$))", "patterns": [ { "include": "#arguments" } ], "beginCaptures": { "1": { "name": "punctuation.separator.method.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "patterns": [ { "include": "#method_names" } ] } } } ] }, "method_names": { "patterns": [ { "name": "support.function.event-handler.coffee", "match": "(?x)\n\\bon(Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\nReadystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\nBefore(cut|deactivate|unload|update|paste|print|editfocus|activate)|\nBlur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\nChange|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\nDatasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\nDragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\nErrorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\\b" }, { "name": "support.function.coffee", "match": "(?x)\n\\b(shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\nscrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\nsup|sub|substr|substring|splice|split|send|set(Milliseconds|Seconds|Minutes|Hours|\nMonth|Year|FullYear|Date|UTC(Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\nTime|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\nsavePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\ncontextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\ncreateEventObject|to(GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\ntest|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\nuntaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\nprint|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\nfileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\nforward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\nabort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\nreleaseCapture|releaseEvents|go|get(Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\nTime|Date|TimezoneOffset|UTC(Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\nAttention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\nmoveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back)\\b" }, { "name": "support.function.dom.coffee", "match": "(?x)\n\\b(acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\nappendChild|appendData|before|blur|canPlayType|captureStream|\ncaretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\ncloneContents|cloneNode|cloneRange|close|closest|collapse|\ncompareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\nconvertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\ncreateAttributeNS|createCaption|createCDATASection|createComment|\ncreateContextualFragment|createDocument|createDocumentFragment|\ncreateDocumentType|createElement|createElementNS|createEntityReference|\ncreateEvent|createExpression|createHTMLDocument|createNodeIterator|\ncreateNSResolver|createProcessingInstruction|createRange|createShadowRoot|\ncreateTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\ndeleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\ndeleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\nenableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\nexitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\ngetAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\ngetAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\ngetClientRects|getContext|getDestinationInsertionPoints|getElementById|\ngetElementsByClassName|getElementsByName|getElementsByTagName|\ngetElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\ngetVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\nhasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\ninsertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\ninsertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\nisPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\nlookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\nmoveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\nparentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\npreviousSibling|probablySupportsContext|queryCommandEnabled|\nqueryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\nquerySelector|querySelectorAll|registerContentHandler|registerElement|\nregisterProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\nremoveAttributeNode|removeAttributeNS|removeChild|removeEventListener|\nremoveItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\nrequestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\nscrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\nsetAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\nsetCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\nsetRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\nslice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\nsubmit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\ntoDataURL|toggle|toString|values|write|writeln)\\b" }, { "name": "entity.name.function.coffee", "match": "[a-zA-Z_$][\\w$]*" }, { "name": "invalid.illegal.identifier.coffee", "match": "\\d[\\w$]*" } ] }, "numbers": { "patterns": [ { "name": "constant.numeric.hex.coffee", "match": "\\b(?\u003c!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)" }, { "name": "constant.numeric.binary.coffee", "match": "\\b(?\u003c!\\$)0(b|B)[01]+\\b(?!\\$)" }, { "name": "constant.numeric.octal.coffee", "match": "\\b(?\u003c!\\$)0(o|O)?[0-7]+\\b(?!\\$)" }, { "match": "(?x)\n(?\u003c!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(?=\\.{2,3}))| # 1 followed by a slice\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)", "captures": { "0": { "name": "constant.numeric.decimal.coffee" }, "1": { "name": "punctuation.separator.decimal.period.coffee" }, "2": { "name": "punctuation.separator.decimal.period.coffee" }, "3": { "name": "punctuation.separator.decimal.period.coffee" }, "4": { "name": "punctuation.separator.decimal.period.coffee" }, "5": { "name": "punctuation.separator.decimal.period.coffee" }, "6": { "name": "punctuation.separator.decimal.period.coffee" } } } ] }, "objects": { "patterns": [ { "name": "constant.other.object.coffee", "match": "[A-Z][A-Z0-9_$]*(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))" }, { "name": "variable.other.object.coffee", "match": "[a-zA-Z_$][\\w$]*(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))" } ] }, "operators": { "patterns": [ { "match": "(?:([a-zA-Z$_][\\w$]*)?\\s+|(?\u003c![\\w$]))(and=|or=)", "captures": { "1": { "name": "variable.assignment.coffee" }, "2": { "name": "keyword.operator.assignment.compound.coffee" } } }, { "match": "([a-zA-Z$_][\\w$]*)?\\s*(%=|\\+=|-=|\\*=|\u0026\u0026=|\\|\\|=|\\?=|(?\u003c!\\()/=)", "captures": { "1": { "name": "variable.assignment.coffee" }, "2": { "name": "keyword.operator.assignment.compound.coffee" } } }, { "match": "([a-zA-Z$_][\\w$]*)?\\s*(\u0026=|\\^=|\u003c\u003c=|\u003e\u003e=|\u003e\u003e\u003e=|\\|=)", "captures": { "1": { "name": "variable.assignment.coffee" }, "2": { "name": "keyword.operator.assignment.compound.bitwise.coffee" } } }, { "name": "keyword.operator.bitwise.shift.coffee", "match": "\u003c\u003c|\u003e\u003e\u003e|\u003e\u003e" }, { "name": "keyword.operator.comparison.coffee", "match": "!=|\u003c=|\u003e=|==|\u003c|\u003e" }, { "name": "keyword.operator.logical.coffee", "match": "\u0026\u0026|!|\\|\\|" }, { "name": "keyword.operator.bitwise.coffee", "match": "\u0026|\\||\\^|~" }, { "match": "([a-zA-Z$_][\\w$]*)?\\s*(=|:(?!:))(?![\u003e=])", "captures": { "1": { "name": "variable.assignment.coffee" }, "2": { "name": "keyword.operator.assignment.coffee" } } }, { "name": "keyword.operator.decrement.coffee", "match": "--" }, { "name": "keyword.operator.increment.coffee", "match": "\\+\\+" }, { "name": "keyword.operator.splat.coffee", "match": "\\.\\.\\." }, { "name": "keyword.operator.existential.coffee", "match": "\\?" }, { "name": "keyword.operator.coffee", "match": "%|\\*|/|-|\\+" }, { "match": "(?x)\n\\b(?\u003c![\\.\\$])\n(?:\n (and|or|not) # logical\n |\n (is|isnt) # comparison\n)\n(?!\\s*:)\\b", "captures": { "1": { "name": "keyword.operator.logical.coffee" }, "2": { "name": "keyword.operator.comparison.coffee" } } } ] }, "properties": { "patterns": [ { "match": "(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))", "captures": { "1": { "name": "punctuation.separator.property.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "name": "constant.other.object.property.coffee" } } }, { "match": "(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)(?=\\s*\\??(\\.\\s*[a-zA-Z_$]\\w*|::))", "captures": { "1": { "name": "punctuation.separator.property.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "name": "variable.other.object.property.coffee" } } }, { "match": "(?:(\\.)|(::))\\s*([A-Z][A-Z0-9_$]*\\b\\$*)", "captures": { "1": { "name": "punctuation.separator.property.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "name": "constant.other.property.coffee" } } }, { "match": "(?:(\\.)|(::))\\s*(\\$*[a-zA-Z_$][\\w$]*)", "captures": { "1": { "name": "punctuation.separator.property.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "name": "variable.other.property.coffee" } } }, { "match": "(?:(\\.)|(::))\\s*([0-9][\\w$]*)", "captures": { "1": { "name": "punctuation.separator.property.period.coffee" }, "2": { "name": "keyword.operator.prototype.coffee" }, "3": { "name": "invalid.illegal.identifier.coffee" } } } ] }, "regex-character-class": { "patterns": [ { "name": "constant.character.character-class.regexp", "match": "\\\\[wWsSdD]|\\." }, { "name": "constant.character.numeric.regexp", "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})" }, { "name": "constant.character.control.regexp", "match": "\\\\c[A-Z]" }, { "name": "constant.character.escape.backslash.regexp", "match": "\\\\." } ] }, "single_quoted_string": { "patterns": [ { "name": "string.quoted.single.coffee", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.backslash.coffee", "match": "(\\\\)(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)", "captures": { "1": { "name": "punctuation.definition.escape.backslash.coffee" } } } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.coffee" } } } ] } } }