fileTypes js htc jsx firstLineMatch ^#!/.*\b(node|js) keyEquivalent ^~J name JavaScript Next patterns include #comments include #support include #core include #special repository brackets patterns captures 1 name entity.name.function.js match (?x) (?<=\.) ([_$a-zA-Z][_$\w]*)? (?=\() name meta.function-call.method.with-arguments.js begin (\() beginCaptures 1 name meta.brace.round.js end (\)) endCaptures 1 name meta.brace.round.js name meta.group.braces.round patterns include source.js begin (\[) beginCaptures 1 name meta.brace.square.js end (\]) endCaptures 1 name meta.brace.square.js name meta.group.braces.square patterns include source.js comments patterns include #special-comments-conditional-compilation begin /\*\*(?!/) captures 0 name punctuation.definition.comment.js end \*/ name comment.block.documentation.js begin /\* captures 0 name punctuation.definition.comment.js end \*/ name comment.block.js captures 1 name punctuation.definition.comment.js match (//).*$\n? name comment.line.double-slash.js captures 0 name punctuation.definition.comment.html.js 2 name punctuation.definition.comment.html.js match (<!--|-->) name comment.block.html.js core patterns include #leading-space include #literal-regex include #literal-number include #literal-quasi include #literal-language-constant include #literal-keywords include #literal-class include #literal-module include #literal-arrow-function include #literal-function-storage include #literal-method include #literal-prototype-storage include #literal-string include #literal-language-variable include #literal-function-call include #literal-labels include #literal-variable include #literal-punctuation include #brackets function-declaration-parameters patterns begin (\() beginCaptures 1 name punctuation.definition.parameters.begin.js end (\)) endCaptures 1 name punctuation.definition.parameters.end.js patterns match (?x) [_$a-zA-Z][_$\w]* name variable.parameter.function.js match , name punctuation.separator.parameter.function.js include #comments leading-space patterns begin ^(?=(\t| )) end (?=[^\t\s]) name meta.leading-tabs patterns captures 1 name meta.odd-tab.group1.spaces 10 name meta.even-tab.group10.spaces 11 name meta.odd-tab.group11.spaces 2 name meta.even-tab.group2.spaces 3 name meta.odd-tab.group3.spaces 4 name meta.even-tab.group4.spaces 5 name meta.odd-tab.group5.spaces 6 name meta.even-tab.group6.spaces 7 name meta.odd-tab.group7.spaces 8 name meta.even-tab.group8.spaces 9 name meta.odd-tab.group9.spaces match ( )( )?( )?( )?( )?( )?( )?( )?( )?( )?( )? captures 1 name meta.odd-tab.group1.tab 10 name meta.even-tab.group10.tab 11 name meta.odd-tab.group11.tab 2 name meta.even-tab.group2.tab 3 name meta.odd-tab.group3.tab 4 name meta.even-tab.group4.tab 5 name meta.odd-tab.group5.tab 6 name meta.even-tab.group6.tab 7 name meta.odd-tab.group7.tab 8 name meta.even-tab.group8.tab 9 name meta.odd-tab.group9.tab match (\t)(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)?(\t)? literal-arrow-function patterns begin (?x) (?=\([^())]*\)\s*(=>)) end (?<=\))\s*(=>) endCaptures 1 name storage.type.function.arrow.js name meta.function.arrow.js patterns include #function-declaration-parameters literal-class patterns captures 1 name storage.type.class.js 2 name entity.name.class.js 3 name storage.type.extends.js 4 name entity.name.extends.js match \b(class)\b(?:\s+([_$a-zA-Z][_$\w]*)\s*(?:\b(extends)\b\s*([_$a-zA-Z][_$\w]*))?)?\s* name meta.class.js captures 1 name storage.modifier.js 2 name storage.type.js 3 name entity.name.field.js match \b(?:(public|private|static)\s+)(?:(var|let|const)\s+)?([_$a-zA-Z][_$\w]*\s*)(?=\=) captures 1 name support.function.private.js match \b(private)(?=\s*\() match \b(public|private|static)\b name storage.modifier.js begin \b(get|set)\s*\b([_$a-zA-Z][_$\w]*)\s* beginCaptures 1 name storage.type.accessor.js 2 name entity.name.accessor.js end (?<=\)) name meta.accessor.js patterns include #function-declaration-parameters literal-function-call patterns begin (?=[_$a-zA-Z][_$\w]*\s*\() end (?=\() name meta.function-call.static.with-arguments.js patterns match ([_$a-zA-Z][_$\w]*)? name entity.name.function.js literal-function-storage patterns begin \b(function\s*\*?)(?:\s*([a-zA-Z_$][_$\w]*))?\s* beginCaptures 1 name storage.type.function.js 2 name entity.name.function.js end (?<=\)) name meta.function.js patterns include #function-declaration-parameters begin ([_$a-zA-Z][_$\w]*)\.(prototype)\.([_$a-zA-Z][_$\w]*)\s*=\s*(function\s*\*?)\s* beginCaptures 1 name entity.name.class.js 2 name support.constant.js 3 name entity.name.function.js 4 name storage.type.function.js end (?<=\)) name meta.prototype.function.js patterns include #function-declaration-parameters begin (?x) (?= ([_$a-zA-Z][_$\w]*)? \.([_$a-zA-Z][_$\w]*)\s* =\s* (function\s*\*?)\s* ) end (?<=\)) name meta.function.static.js patterns include #literal-language-variable begin \b(function\s*\*?)(?:\s*([a-zA-Z_$][_$\w]*))?\s* beginCaptures 1 name storage.type.function.js 2 name entity.name.function.js end (?<=\)) patterns include #function-declaration-parameters begin \b([_$a-zA-Z][_$\w]*)\s*(:)\s*\b(function\s*\*?)\s* beginCaptures 1 name entity.name.function.js 2 name punctuation.separator.key-value.js 3 name storage.type.function.js end (?<=\)) name meta.function.json.js patterns include #function-declaration-parameters begin (?x) (?: ((')(.*?)(?<!\\)('))| ((")(.*?)(?<!\\)(")) )\s* (:)\s* \b(function\s*\*?)\s* beginCaptures 1 name string.quoted.single.js 10 name storage.type.function.js 2 name punctuation.definition.string.begin.js 3 name entity.name.function.js 4 name punctuation.definition.string.end.js 5 name string.quoted.double.js 6 name punctuation.definition.string.begin.js 7 name entity.name.function.js 8 name punctuation.definition.string.end.js 9 name punctuation.separator.key-value.js end (?<=\)) name meta.function.json.js patterns include #function-declaration-parameters literal-keywords patterns begin (new)\s+(?=[_$a-zA-Z][_$\w.]*) beginCaptures 1 name keyword.operator.new.js end (?![_$a-zA-Z][_$\w.]*) name meta.instance.constructor patterns include #support captures 2 name entity.name.type.new.js match ([_$a-zA-Z][_$\w.]*\.)?([_$a-zA-Z][_$\w]*) match \b(var|let|const)\b name storage.type.js match \b(return|yield)\b name keyword.control.flow.js match \b(else|if)\b name keyword.control.conditional.js match \b(catch|finally|throw|try)\b name keyword.control.trycatch.js match \b(break|continue|do|for|goto|while)\b name keyword.control.loop.js match \b(case|default|switch)\b name keyword.control.switch.js match \b(delete|in(stanceof)?|of|new|typeof|void|with)\b name keyword.operator.js match !|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|/=|%=|\+=|\-=|&=|\^= name keyword.operator.js match : name punctuation.separator.key-value match (?x) !(?!=)| # logical-not right-to-left right && | # logical-and left-to-right both \|\| # logical-or left-to-right both name keyword.operator.logical.js match (?x) %= | # assignment right-to-left both &= | # assignment right-to-left both \*= | # assignment right-to-left both \+= | # assignment right-to-left both -= | # assignment right-to-left both /= | # assignment right-to-left both \^= | # assignment right-to-left both \|= | # assignment right-to-left both <<= | # assignment right-to-left both >>= | # assignment right-to-left both >>>= # assignment right-to-left both name keyword.operator.assignment.augmented.js match (?x) ~ | # bitwise-not right-to-left right << | # bitwise-shift left-to-right both >>> | # bitwise-shift left-to-right both >> | # bitwise-shift left-to-right both & | # bitwise-and left-to-right both \^ | # bitwise-xor left-to-right both \| # bitwise-or left-to-right both name keyword.operator.bitwise.js match (?x) <= | # relational left-to-right both >= | # relational left-to-right both < | # relational left-to-right both > # relational left-to-right both name keyword.operator.relational.js match (?x) === | # equality left-to-right both !== | # equality left-to-right both == | # equality left-to-right both != # equality left-to-right both name keyword.operator.comparison.js match (?x)= name keyword.operator.assignment.js match (?x) -- | # decrement n/a right-or-left \+\+ | # increment n/a right-or-left / | # division left-to-right both % | # modulus left-to-right both \* | # multiplication left-to-right both \+ | # addition left-to-right both - # subtraction left-to-right both name keyword.operator.arithmetic.js literal-labels patterns captures 2 name punctuation.separator.key-value.js match (?<=['"])(\s*)(:) captures 1 name string.unquoted.label.js 2 name punctuation.separator.key-value.js match (?<!\?|\? |case )(?!\?)([_$a-zA-Z][_$\w]*)\s*(:) name constant.other.object.key.js literal-language-constant patterns match \btrue\b name constant.language.boolean.true.js match \bfalse\b name constant.language.boolean.false.js match \bnull\b name constant.language.null.js match \bundefined\b name constant.language.undefined.js match \bNaN\b name constant.language.nan.js literal-language-variable patterns match (?<!\.)\b(arguments)\b name variable.language.arguments.js match (?<!\.)\b(super)\b name variable.language.super.js match (?<!\.)\b(this)\b name variable.language.this.js match (?<!\.)\b(self)\b name variable.language.self.js match (?<=\.)\b(__proto__)\b name variable.language.proto.js match (?<=\.)\b(constructor)\b name variable.language.constructor.js match (?<=\.)\b(prototype)\b name variable.language.prototype.js literal-method patterns captures 1 name entity.name.function.js match (?x) (?<=\.) ([_$a-zA-Z][_$\w]*) (?=\() name meta.function-call.method.with-arguments.js captures 1 name entity.name.function.js 2 name meta.group.braces.round.function.arguments.js 3 name meta.brace.round.js match (?x) (?<=\.) ([_$a-zA-Z][_$\w]*) (\(\s*\)) name meta.function-call.method.without-arguments.js begin (?x) (?<!function\s) # An approximation due to fixed width look-behind, but usually good enough \b([_$a-zA-Z][_$\w]*) \s* (?=\([^())]*\)\s*\{) beginCaptures 1 name entity.name.method.js end (?<=\)) name meta.method.js patterns include #function-declaration-parameters literal-module patterns match \b(module)\b name storage.type.module.js match \b(import|export|from|as)\b name keyword.operator.module.js literal-number patterns match (?i)(?:\B[-+]|\b)0x[0-9a-f]*\.(\B|\b[0-9]+) name invalid.illegal.numeric.hex.js match (?:\B[-+]|\b)0[0-9]+\.(\B|\b[0-9]+) name invalid.illegal.numeric.octal.js match (?xi) (?:\B[-+])? (?: \b0x[0-9a-f]*| # hex ( \B\.[0-9]+| # e.g. .999 \b[0-9]+(\.[0-9]*)? # e.g. 999.999, 999. or 999 )(e[-+]?[0-9]+)? # e.g. e+123, E-123 ) name constant.numeric.js match (?:\B[-+]|\b)(Infinity)\b name constant.language.infinity.js literal-prototype-storage patterns captures 1 name entity.name.class.js 2 name support.constant.js match ([_$a-zA-Z][_$\w]*)\.(prototype)\s*=\s* name meta.prototype.declaration.js captures 1 name entity.name.class.js 2 name support.constant.js match ([_$a-zA-Z][_$\w]*)\.(prototype) name meta.prototype.js literal-punctuation patterns match \; name punctuation.terminator.statement.js match , name meta.delimiter.object.comma.js match \. name meta.delimiter.method.period.js match \{|\} name meta.brace.curly.js match \(|\) name meta.brace.round.js match \[|\] name meta.brace.square.js match (?<=\.)\s name meta.complete.method literal-quasi patterns begin ([a-zA-Z$_][\w$_]*)?(`) beginCaptures 1 name entity.quasi.tag.name.js 2 name punctuation.definition.quasi.begin.js end ` endCaptures 0 name punctuation.definition.quasi.end.js name string.quasi.js patterns begin \${ beginCaptures 0 name punctuation.quasi.element.begin.js end } endCaptures 0 name punctuation.quasi.element.end.js name entity.quasi.element.js patterns include source.js literal-regex patterns begin (?x) (?<= [\[,=(:?]| ^|&&| return )\s* (/) (?![/*+{}?]|$) beginCaptures 1 name string.regexp.js 2 name punctuation.definition.string.begin.js contentName string.regexp.js end ((/)([gimy]*)) endCaptures 1 name string.regexp.js 2 name punctuation.definition.string.end.js 3 name keyword.other.js patterns include source.regexp.js literal-string patterns begin ' beginCaptures 0 name punctuation.definition.string.begin.js end (')|(\n) endCaptures 1 name punctuation.definition.string.end.js 2 name invalid.illegal.newline.js name string.quoted.single.js patterns include #string-content begin " beginCaptures 0 name punctuation.definition.string.begin.js end (")|(\n) endCaptures 1 name punctuation.definition.string.end.js 2 name invalid.illegal.newline.js name string.quoted.double.js patterns include #string-content literal-variable patterns match \.?[A-Z][_$\dA-Z]*\b name variable.other.constant.js captures 1 name variable.other.class.js 2 name meta.function-call.class.static.js 3 name variable.other.class.static.js match \b([A-Z][_$\w]*\.?)\s*?(?:([a-z$_][\w_$]*(?=\())|([a-z$_][\w_$]*))? name meta.entity.static.js match (?<!\.)[_$a-zA-Z][_$\w]*\s*(?=[\[\.]) name variable.other.object.js captures 0 name meta.property-name.js 1 name variable.other.object.js match ([_$a-zA-Z][_$\w]*)\s*(?=[\[\.]) name meta.property.js captures 0 name variable.other.property.js match (?<=[\.])\s*[_$a-zA-Z][_$\w]* name meta.property.js match [_$a-zA-Z][_$\w]* name variable.other.readwrite.js special patterns match \b(console)\b name entity.name.type.object.js.firebug match \.(warn|info|log|error|time|timeEnd|assert)\b name support.function.js.firebug match \b(debugger)\b name keyword.other.js special-comments-conditional-compilation patterns begin /\*(?=@) captures 0 name punctuation.definition.comment.js end \*/ endCaptures 1 name keyword.control.conditional.js 2 name punctuation.definition.keyword.js name comment.block.conditional.js patterns include source.js captures 1 name punctuation.definition.keyword.js match (@)(if|elif|else|end) name keyword.control.conditional.js captures 1 name punctuation.definition.keyword.js match (@)(cc_on|set) name keyword.operator.conditional.js captures 1 name punctuation.definition.variable.js match (@)(_win32|_win16|_mac|_alpha|_x86|_mc680x0|_PowerPC|_jscript_build|_jscript_version|_jscript|_debug|_fast|[a-zA-Z]\w+) name variable.other.conditional.js string-content patterns match \\\s*\n name constant.character.escape.newline.js match \\(x[\da-fA-F]{2}|u[\da-fA-F]{4}|.) name constant.character.escape.js support patterns match \b(Array|Boolean|Date|Function|Map|Number|Object|Proxy|RegExp|Set|String|WeakMap)\b name support.class.builtin.js match \b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape)\b(?=\() name support.function.js match \b(s(hift|ort|plice)|unshift|p(op|ush)|reverse)\b(?=\() name support.function.mutator.js match \b((Eval|Range|Reference|Syntax|Type|URI)?Error)\b name support.class.error.js match \b(document|window)\b name support.type.object.dom.js match (?x) \b( ELEMENT_NODE|ATTRIBUTE_NODE|TEXT_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE| DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|INDEX_SIZE_ERR|DOMSTRING_SIZE_ERR|HIERARCHY_REQUEST_ERR| WRONG_DOCUMENT_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR|NOT_SUPPORTED_ERR|INUSE_ATTRIBUTE_ERR )\b name support.constant.dom.js match \b(console)\b name support.type.object.firebug.js match \b(natives|buffer|child_process|cluster|crypto|d(gram|ns)|fs|http(s)?|net|os|path|punycode|(query)?string(_decoder)?|re(adline|pl)|tls|tty|util|vm|zlib)\b name support.module.node.js match \b(process(.env)?|global|GLOBAL|root|std(out|in|err)|exports|__dirname|__filename|console)\b name support.type.object.node.js match \b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream|Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\b name support.class.node.js scopeName source.js uuid 487CF323-A3F9-48FA-B140-DCE8C893E664