{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "javascriptreact",
"scopeName": "source.js.jsx",
"patterns": [
{
"include": "#jsx-self-closing-element-in-expression"
},
{
"include": "#jsx-element-in-expression"
},
{
"include": "#jsx-fragment-in-expression"
},
{
"include": "#shebang"
},
{
"include": "#jsdoc"
},
{
"include": "#directives"
},
{
"include": "#linecomment"
},
{
"include": "#blockcomment"
},
{
"include": "#regex-literal-prefix-ops"
},
{
"include": "#regex"
},
{
"include": "#qstring-double"
},
{
"include": "#qstring-single"
},
{
"include": "#template"
},
{
"include": "#decorator"
},
{
"include": "#object-method-key"
},
{
"include": "#arrow-function-params"
},
{
"include": "#ternary-expression"
},
{
"include": "#function-declaration"
},
{
"include": "#function-anon-declaration"
},
{
"include": "#class-declaration"
},
{
"include": "#extends-definition"
},
{
"include": "#let-destructure"
},
{
"include": "#const-binding"
},
{
"include": "#const-destructure"
},
{
"include": "#var-destructure"
},
{
"include": "#using-destructure"
},
{
"include": "#import-export-all"
},
{
"include": "#hexnumber"
},
{
"include": "#octalnumber"
},
{
"include": "#binarynumber"
},
{
"include": "#bigint"
},
{
"include": "#number"
},
{
"include": "#scope-keyword-operator-expression"
},
{
"include": "#scope-keyword-control-loop"
},
{
"include": "#scope-keyword-control-flow"
},
{
"include": "#scope-keyword-control-import"
},
{
"include": "#scope-keyword-control-conditional"
},
{
"include": "#scope-keyword-control-switch"
},
{
"include": "#scope-keyword-control-trycatch"
},
{
"include": "#scope-keyword-control"
},
{
"include": "#scope-keyword-control-export"
},
{
"include": "#scope-keyword-control-from-from"
},
{
"include": "#scope-keyword-other"
},
{
"include": "#scope-storage-type-class"
},
{
"include": "#scope-keyword-other-extends"
},
{
"include": "#scope-storage-modifier"
},
{
"include": "#scope-storage-modifier-accessibility"
},
{
"include": "#scope-storage-type-function"
},
{
"include": "#scope-storage-type-property"
},
{
"include": "#scope-storage-type"
},
{
"include": "#scope-storage-type-function-arrow"
},
{
"include": "#scope-constant-language-boolean-true"
},
{
"include": "#scope-constant-language-boolean-false"
},
{
"include": "#scope-constant-language-null"
},
{
"include": "#this-literal"
},
{
"include": "#super-literal"
},
{
"include": "#scope-support-class"
},
{
"include": "#scope-support-variable"
},
{
"include": "#method-call"
},
{
"include": "#known-property-access"
},
{
"include": "#property-access"
},
{
"include": "#operator-overrides"
},
{
"include": "#operators"
},
{
"include": "#punctuation-accessor"
},
{
"include": "#scope-punctuation-bracket-round"
},
{
"include": "#punctuation-comma"
},
{
"include": "#scope-punctuation-bracket-square"
},
{
"include": "#scope-punctuation-accessor-optional"
},
{
"include": "#scope-punctuation-bracket-curly"
},
{
"include": "#punctuation-semicolon"
},
{
"include": "#punctuation"
},
{
"include": "#arrow-parameter"
},
{
"include": "#function-call"
},
{
"include": "#ident"
},
{
"include": "#privatefield"
}
],
"repository": {
"jsx-children": {
"patterns": [
{
"include": "#jsx-element"
},
{
"include": "#jsx-fragment"
},
{
"include": "#jsx-element-multiline"
},
{
"include": "#jsx-expression"
},
{
"include": "#jsx-entities"
}
]
},
"jsx-expression": {
"name": "meta.embedded.expression.js.jsx",
"begin": "\\{",
"beginCaptures": {
"0": {
"name": "punctuation.section.embedded.begin.js.jsx"
}
},
"end": "\\}",
"endCaptures": {
"0": {
"name": "punctuation.section.embedded.end.js.jsx"
}
},
"patterns": [
{
"include": "$self"
}
]
},
"jsx-string-double-quoted": {
"name": "string.quoted.double.js.jsx",
"begin": "\"",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js.jsx"
}
},
"end": "\"",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.js.jsx"
}
}
},
"jsx-string-single-quoted": {
"name": "string.quoted.single.js.jsx",
"begin": "'",
"beginCaptures": {
"0": {
"name": "punctuation.definition.string.begin.js.jsx"
}
},
"end": "'",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.js.jsx"
}
}
},
"jsx-attributes": {
"patterns": [
{
"include": "#shebang"
},
{
"include": "#jsdoc"
},
{
"include": "#directives"
},
{
"include": "#linecomment"
},
{
"include": "#blockcomment"
},
{
"match": "\\s*(?:((?:[a-zA-Z_$\\p{L}\\p{Nl}]|\\\\u[0-9A-Fa-f]{4}|\\\\u\\{[0-9A-Fa-f]+\\})(?:[a-zA-Z0-9_$\\p{L}\\p{Nl}\\p{Nd}\\p{Mn}\\p{Mc}\\p{Pc}]|\\\\u[0-9A-Fa-f]{4}|\\\\u\\{[0-9A-Fa-f]+\\})*)(:))?([_$[:alpha:]][-_$[:alnum:].]*)(?=\\s|=|/?>|$)",
"captures": {
"1": {
"name": "entity.other.attribute-name.namespace.js.jsx"
},
"2": {
"name": "punctuation.separator.namespace.js.jsx"
},
"3": {
"name": "entity.other.attribute-name.js.jsx"
}
}
},
{
"match": "=(?=\\s*(?:'|\"|\\{))",
"name": "keyword.operator.assignment.js.jsx"
},
{
"include": "#jsx-string-double-quoted"
},
{
"include": "#jsx-string-single-quoted"
},
{
"include": "#jsx-expression"
}
]
},
"jsx-self-closing-element": {
"name": "meta.tag.js.jsx",
"begin": "(|)|()",
"patterns": [
{
"include": "#jsx-attributes"
}
]
},
{
"begin": "(>)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.end.js.jsx"
}
},
"end": "(?=)|(?=/>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.js.jsx"
}
},
"patterns": [
{
"include": "#jsx-attributes"
}
]
}
]
},
"jsx-fragment": {
"name": "meta.tag.js.jsx",
"begin": "()",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.js.jsx"
},
"2": {
"name": "punctuation.definition.tag.end.js.jsx"
}
},
"end": "()",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.js.jsx"
},
"2": {
"name": "punctuation.definition.tag.end.js.jsx"
}
},
"contentName": "meta.jsx.children.js.jsx",
"patterns": [
{
"include": "#jsx-children"
}
]
},
"jsx-self-closing-element-in-expression": {
"begin": "(?&|]|&&|\\|\\||=>|\\breturn|\\byield|\\bdefault|\\bcase|^)(?=\\s*(?:(?:/\\*\\*(?!/)(?:(?!\\*/)[\\s\\S])*?\\*/|/\\*(?:(?!\\*/)[\\s\\S])*?\\*/)\\s*)*()",
"end": "(?!\\s*(?:(?:/\\*\\*(?!/)(?:(?!\\*/)[\\s\\S])*?\\*/|/\\*(?:(?!\\*/)[\\s\\S])*?\\*/)\\s*)*()",
"patterns": [
{
"include": "#shebang"
},
{
"include": "#jsdoc"
},
{
"include": "#directives"
},
{
"include": "#linecomment"
},
{
"include": "#blockcomment"
},
{
"include": "#jsx-self-closing-element"
}
]
},
"jsx-element-in-expression": {
"begin": "(?&|]|&&|\\|\\||=>|\\breturn|\\byield|\\bdefault|\\bcase|^)(?=\\s*(?:(?:/\\*\\*(?!/)(?:(?!\\*/)[\\s\\S])*?\\*/|/\\*(?:(?!\\*/)[\\s\\S])*?\\*/)\\s*)*(||\\breturn|\\byield|\\bdefault|\\bcase|^)(?=\\s*(?:(?:/\\*\\*(?!/)(?:(?!\\*/)[\\s\\S])*?\\*/|/\\*(?:(?!\\*/)[\\s\\S])*?\\*/)\\s*)*())",
"end": "(?!\\s*(?:(?:/\\*\\*(?!/)(?:(?!\\*/)[\\s\\S])*?\\*/|/\\*(?:(?!\\*/)[\\s\\S])*?\\*/)\\s*)*())",
"patterns": [
{
"include": "#shebang"
},
{
"include": "#jsdoc"
},
{
"include": "#directives"
},
{
"include": "#linecomment"
},
{
"include": "#blockcomment"
},
{
"include": "#jsx-fragment"
}
]
},
"regex-literal-prefix-ops": {
"name": "string.regexp.js.jsx",
"begin": "(?:(?