fileTypes jsx name JavaScriptReact patterns include #expression repository access-modifier match \b(public|protected|private)\b name storage.modifier.jsx arithmetic-operator match \*|/|\-\-|\-|\+\+|\+|% name keyword.operator.arithmetic.jsx array-literal begin \[ beginCaptures 0 name meta.brace.square.jsx end \] endCaptures 0 name meta.brace.square.jsx name meta.array.literal.jsx patterns include #expression assignment-operator match <<=|>>=|>>>=|\*=|(?<!\()/=|%=|\+=|\-=|&=|\^= name keyword.operator.assignment.jsx block begin \{ beginCaptures 0 name meta.brace.curly.jsx end \} endCaptures 0 name meta.brace.curly.jsx name meta.block.jsx patterns include #object-member include #expression boolean-literal match \b(false|true)\b name constant.language.boolean.jsx comment name comment.jsx patterns include #comment-block-doc include #comment-block include #comment-line comment-block begin /\* end \*/ name comment.block.jsx comment-block-doc begin /\*\*(?!/) end \*/ name comment.block.documentation.jsx comment-line match (//).*$\n? name comment.line.jsx control-statement match (?<!\.)\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|switch|case)\b name keyword.control.jsx decl-block begin \{ beginCaptures 0 name meta.brace.curly.jsx end \} endCaptures 0 name meta.brace.curly.jsx name meta.decl.block.jsx patterns include #expression declaration name meta.declaration.jsx patterns include #function-declaration include #object-declaration include #type-declaration include #enum-declaration enum-declaration captures 1 name storage.modifier.jsx 2 name storage.type.jsx 3 name entity.name.class.jsx match (?:\b(const)\s+)?\b(enum)\s+([a-zA-Z_$][\w$]*) name meta.enum.declaration.jsx expression name meta.expression.jsx patterns include #jsx include #for-in-simple include #string include #regex include #template include #comment include #literal include #paren-expression include #var-expr include #declaration include #new-expr include #block include #expression-operator include #relational-operator include #arithmetic-operator include #logic-operator include #assignment-operator include #storage-keyword include #function-call include #switch-case include #control-statement expression-operator match =>|\b(delete|export|import|in|instanceof|module|namespace|new|typeof|void|as)\b name keyword.operator.jsx field-declaration begin (?<!\()\s*((?:\b[a-zA-Z_$][\w$]*)|(?:\'[^']*\')|(?:\"[^"]*\"))\s*(\?\s*)?(?=(=|:)) beginCaptures 1 name variable.jsx 2 name keyword.operator.jsx end (?=\}|;|,)|(?<=\}) name meta.field.declaration.jsx patterns include #expression for-in-simple captures 1 name storage.type.jsx 3 name keyword.operator.jsx match (?<=\()\s*\b(var|let|const)\s+([a-zA-Z_$][\w$]*)\s+(in|of)\b name forin.expr.jsx function-call name functioncall.expr.jsx patterns include #type-parameters include #paren-expression function-declaration begin \b(?:(export)\s+)?(function\b)(?:\s+([a-zA-Z_$][\w$]*))?\s* beginCaptures 1 name storage.modifier.jsx 2 name storage.type.function.jsx 3 name entity.name.function.jsx end (?=;|\})|(?<=\}) name meta.function.jsx patterns include #comment include #type-parameters include #function-type-parameters include #return-type include #function-overload-declaration include #decl-block function-overload-declaration captures 1 name storage.modifier.jsx 2 name storage.type.function.jsx 3 name entity.name.function.jsx match \b(?:(export)\s+)?(function\b)(?:\s+([a-zA-Z_$][\w$]*))?\s* name meta.function.overload.jsx function-type-parameters begin \( beginCaptures 0 name meta.brace.round.jsx end \) endCaptures 0 name meta.brace.round.jsx name meta.function.type.parameter.jsx patterns include #comment include #parameter-name include #type-annotation include #variable-initializer indexer-declaration begin \[ beginCaptures 0 name meta.brace.square.jsx end (\])\s*(\?\s*)?|$ endCaptures 1 name meta.brace.square.jsx 2 name keyword.operator.jsx name meta.indexer.declaration.jsx patterns include #type-annotation include #indexer-parameter include #expression indexer-parameter captures 1 name variable.parameter.jsx match ([a-zA-Z_$][\w$]*)(?=\:) name meta.indexer.parameter.jsx jsx name meta.jsx.jsx patterns include #jsx-tag-without-attributes include #jsx-tag-open include #jsx-tag-close include #jsx-tag-invalid begin (?<=(?:'|"|})>) end (?=</) name meta.jsx.children.jsx patterns include #jsx-children jsx-children patterns include #jsx-tag-without-attributes include #jsx-tag-open include #jsx-tag-close include #jsx-tag-invalid include #jsx-evaluated-code include #jsx-entities jsx-entities patterns captures 1 name punctuation.definition.entity.jsx 3 name punctuation.definition.entity.jsx match (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;) name constant.character.entity.jsx match & name invalid.illegal.bad-ampersand.jsx jsx-evaluated-code begin { beginCaptures 0 name punctuation.definition.brace.curly.start.jsx end } endCaptures 0 name punctuation.definition.brace.curly.end.jsx name meta.brace.curly.jsx patterns include #expression jsx-string-double-quoted begin " beginCaptures 0 name punctuation.definition.string.begin.jsx end " endCaptures 0 name punctuation.definition.string.end.jsx name string.quoted.double.jsx patterns include #jsx-entities jsx-string-single-quoted begin ' beginCaptures 0 name punctuation.definition.string.begin.jsx end ' endCaptures 0 name punctuation.definition.string.end.jsx name string.quoted.single.jsx patterns include #jsx-entities jsx-tag-attribute-assignment match =(?=\s*(?:'|"|{|/\*|//|\n)) name keyword.operator.assignment.jsx jsx-tag-attribute-name captures 1 name entity.other.attribute-name.jsx match (?x) \s* ([_$a-zA-Z][-$\w]*) (?=\s|=|/?>|/\*|//) name meta.tag.attribute-name.jsx jsx-tag-attributes patterns include #jsx-tag-attribute-name include #jsx-tag-attribute-assignment include #jsx-string-double-quoted include #jsx-string-single-quoted include #jsx-evaluated-code jsx-tag-attributes-illegal match \S+ name invalid.illegal.attribute.jsx jsx-tag-close begin (</)([_$a-zA-Z][-$\w.]*(?<!\.|-)) beginCaptures 1 name punctuation.definition.tag.begin.jsx 2 name entity.name.tag.jsx end (>) endCaptures 1 name punctuation.definition.tag.end.jsx name tag.close.jsx patterns include #comment jsx-tag-invalid match <\s*> name invalid.illegal.tag.incomplete.jsx jsx-tag-open begin (?x) (<) ([_$a-zA-Z][-$\w.]*(?<!\.|-)) (?=\s+(?!\?)|/?>) beginCaptures 1 name punctuation.definition.tag.begin.jsx 2 name entity.name.tag.jsx end (/?>) endCaptures 1 name punctuation.definition.tag.end.jsx name tag.open.jsx patterns include #comment include #jsx-tag-attributes include #jsx-tag-attributes-illegal jsx-tag-without-attributes begin (<)([_$a-zA-Z][-$\w.]*(?<!\.|-))(>) beginCaptures 1 name punctuation.definition.tag.begin.jsx 2 name entity.name.tag.jsx 3 name punctuation.definition.tag.end.jsx end (</)([_$a-zA-Z][-$\w.]*(?<!\.|-))(>) endCaptures 1 name punctuation.definition.tag.begin.jsx 2 name entity.name.tag.jsx 3 name punctuation.definition.tag.end.jsx name tag.without-attributes.jsx patterns include #jsx-children literal name literal.jsx patterns include #numeric-literal include #boolean-literal include #null-literal include #undefined-literal include #array-literal include #this-literal logic-operator match \!|&|~|\||&&|\|\| name keyword.operator.arithmetic.jsx method-declaration begin \b(?:(abstract)\s+)?\b(?:(public|private|protected)\s+)?(?:(get|set)\s+)?(?:(new)|(?:([a-zA-Z_$][\.\w$]*)\s*(\??)))?\s*(?=\(|\<) beginCaptures 1 name storage.modifier.jsx 2 name storage.modifier.jsx 3 name storage.type.property.jsx 4 name keyword.operator.jsx 5 name entity.name.function.jsx 6 name keyword.operator.jsx end (?=\}|;|,)|(?<=\}) name meta.method.declaration.jsx patterns include #comment include #type-parameters include #function-type-parameters include #type-annotation include #method-overload-declaration include #decl-block method-overload-declaration captures 1 name storage.modifier.jsx 2 name keyword.operator.jsx 3 name entity.name.function.jsx 4 name keyword.operator.jsx match \b(?:(public|private|protected)\s+)?(?:(new)|(?:([a-zA-Z_$][\.\w$]*)\s*(\??)))?\s*(?=\(|\<) name meta.method.overload.declaration.jsx new-expr begin \b(new)\b beginCaptures 1 name keyword.operator.jsx end (?=[(;]|$) name new.expr.jsx patterns include #type null-literal match \b(null)\b name constant.language.null.jsx numeric-literal match \b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|([0-9]+(\.[0-9]+)?))\b name constant.numeric.jsx object-body begin \{ beginCaptures 0 name meta.brace.curly.jsx end \} endCaptures 0 name meta.brace.curly.jsx name meta.object.body.jsx patterns include #string include #comment include #field-declaration include #method-declaration include #indexer-declaration include #type-annotation include #variable-initializer include #access-modifier include #static-modifier include #property-accessor object-declaration begin \b(?:(export)\s+)?\b(?:(abstract)\s+)?\b(?<!\.)(class|interface)\b beginCaptures 1 name storage.modifier.jsx 2 name storage.modifier.jsx 3 name storage.type.jsx end (?<=\}) endCaptures 1 name brace.curly.jsx name meta.declaration.object.jsx patterns include #comment include #object-heritage include #object-name include #type-parameters include #object-body object-heritage begin (?:\b(extends|implements)) beginCaptures 1 name keyword.other.jsx end (?=\{) endCaptures 1 name brace.curly.jsx name meta.object.heritage.jsx patterns include #comment include #type-parameters include #object-heritage-parent object-heritage-parent captures 1 name storage.type.jsx match (?:\s*([a-zA-Z_$][\w$]*)) name meta.object.heritage.parent.jsx object-member begin [a-zA-Z_$][\w$]*\s*: end (?=,|\}) name meta.object.member.jsx patterns include #expression object-name captures 0 name entity.name.class.jsx match [a-zA-Z_$][\w$]* name meta.object.name.jsx parameter-name captures 1 name storage.modifier.jsx 2 name keyword.operator.jsx 3 name variable.parameter.jsx 4 name keyword.operator.jsx match (?:\s*\b(public|private|protected)\b\s+)?(\.\.\.)?\s*([a-zA-Z_$][\w$]*)\s*(\??) name parameter.name.jsx paren-expression begin \( beginCaptures 0 name meta.brace.paren.jsx end \) endCaptures 0 name meta.brace.paren.jsx patterns include #expression property-accessor match \b(get|set)\b name storage.type.property.jsx qstring-double begin " end "|(?=$) name string.double.jsx patterns include #string-character-escape qstring-single begin ' end '|(?=$) name string.single.jsx patterns include #string-character-escape regex begin (?<=[=(:,\[]|^|return|&&|\|\||!)\s*(/)(?![/*+{}?]) end $|(/)[igm]* name string.regex.jsx patterns match \\. name constant.character.escape.jsx match \[(\\\]|[^\]])*\] name constant.character.class.jsx relational-operator match ===|==|=|!=|!==|<=|>=|<>|<|> name keyword.operator.comparison.jsx return-type begin (?<=\))\s*: end (?=$)|(?=\{|;|//) name meta.return.type.jsx patterns include #type static-modifier match \b(static)\b name keyword.other.jsx storage-keyword match \b(number|boolean|string|any|var|let|function|const)\b name storage.type.jsx string name string.jsx patterns include #qstring-single include #qstring-double string-character-escape match \\(x\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$) name constant.character.escape switch-case begin (?<!\.)\b(case|default)\b beginCaptures 1 name keyword.control.jsx end : name case.expr.jsx patterns include #expression template begin ` beginCaptures 0 name string.template.jsx end ` endCaptures 0 name string.template.jsx name meta.template.jsx patterns include #template-substitution-element include #template-string-contents template-string-contents begin .*? end (?=(\$\{|`)) name string.template.jsx patterns include #string-character-escape template-substitution-element begin \$\{ beginCaptures 0 name keyword.operator.jsx end \} endCaptures 0 name keyword.operator.jsx name template.element.jsx patterns include #expression this-literal match \b(this)\b name constant.language.this.jsx type name meta.type.jsx patterns include #type-primitive include #type-parameters include #type-tuple include #type-object include #type-operator include #type-paren-or-function-type-parameters include #type-function-return-type include #type-name type-annotation begin : end (?=$|[,);\}\]]|//)|(?==[^>])|(?<=[\}>\]\)]|[a-zA-Z_$])\s*(?=\{) name meta.type.annotation.jsx patterns include #type include #string include #comment type-declaration begin \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s* beginCaptures 1 name keyword.other.jsx 2 name storage.type.jsx end (?=[,);>]|var|type|function|class|interface) name meta.type.declaration.jsx patterns include #type type-function-return-type begin => beginCaptures 0 name keyword.operator.jsx end (?=\s*[,\)\{=;>]|//|$) name meta.type.function.return.jsx patterns include #type type-name captures 1 name entity.name.type.jsx match [a-zA-Z_$][.\w$]* name meta.type.name.jsx type-object begin \{ beginCaptures 0 name meta.brace.curly.jsx end \} endCaptures 0 name meta.brace.curly.jsx name meta.object.type.jsx patterns include #comment include #field-declaration include #method-declaration include #indexer-declaration include #type-annotation type-operator match [.|] name keyword.operator.type.jsx type-parameters begin ([a-zA-Z_$][\w$]*)?(<) beginCaptures 1 name entity.name.type.jsx 2 name meta.brace.angle.jsx end (?=$)|(>) endCaptures 2 name meta.brace.angle.jsx name meta.type.parameters.jsx patterns match \b(extends)\b name keyword.other.jsx include #comment include #type type-paren-or-function-type-parameters begin (?:\b(new)\b)?\s*\( beginCaptures 1 name keyword.control.jsx end \) name meta.type.paren.cover.jsx patterns include #comment include #type include #function-type-parameters type-primitive captures 1 name storage.type.jsx match \b(string|number|boolean|symbol|any|void)\b name meta.type.primitive.jsx type-tuple begin \[ beginCaptures 0 name meta.brace.square.jsx end \] endCaptures 0 name meta.brace.square.jsx name meta.type.tuple.jsx patterns include #type include #comment undefined-literal match \b(undefined)\b name constant.language.jsx var-expr begin (?<!\()\s*\b(var|let|const(?!\s+enum))\s+([a-zA-Z_$][\w$]*) beginCaptures 1 name storage.type.jsx 2 name variable.jsx end (?=$|[;=\}\{])|(?<=\}) name meta.var.expr.jsx patterns include #type-annotation include #string include #comment variable-initializer begin (=) beginCaptures 1 name keyword.operator.jsx end (?=$|[,);=]) patterns include #expression scopeName source.jsx uuid 805375ec-d614-41f5-8993-5843fe63ea82