mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-25 15:58:51 +01:00
Update TypeScript.sublime-syntax
This commit is contained in:
parent
65811d9034
commit
4d2682325b
103
assets/syntaxes/TypeScript.sublime-syntax
vendored
103
assets/syntaxes/TypeScript.sublime-syntax
vendored
@ -47,7 +47,7 @@ contexts:
|
|||||||
- match: (?=$)
|
- match: (?=$)
|
||||||
pop: true
|
pop: true
|
||||||
access-modifier:
|
access-modifier:
|
||||||
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
|
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static|declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
|
||||||
scope: storage.modifier.ts
|
scope: storage.modifier.ts
|
||||||
after-operator-block-as-object-literal:
|
after-operator-block-as-object-literal:
|
||||||
- match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
|
- match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
|
||||||
@ -757,20 +757,22 @@ contexts:
|
|||||||
2: keyword.control.as.ts
|
2: keyword.control.as.ts
|
||||||
3: storage.type.namespace.ts
|
3: storage.type.namespace.ts
|
||||||
4: entity.name.type.module.ts
|
4: entity.name.type.module.ts
|
||||||
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
|
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
|
||||||
captures:
|
captures:
|
||||||
1: keyword.control.export.ts
|
1: keyword.control.export.ts
|
||||||
2: keyword.operator.assignment.ts
|
2: keyword.control.type.ts
|
||||||
3: keyword.control.default.ts
|
3: keyword.operator.assignment.ts
|
||||||
|
4: keyword.control.default.ts
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.export.default.ts
|
- meta_scope: meta.export.default.ts
|
||||||
- match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
|
- match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
|
||||||
pop: true
|
pop: true
|
||||||
- include: interface-declaration
|
- include: interface-declaration
|
||||||
- include: expression
|
- include: expression
|
||||||
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b)))'
|
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:\s+(type))?\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b)))'
|
||||||
captures:
|
captures:
|
||||||
0: keyword.control.export.ts
|
1: keyword.control.export.ts
|
||||||
|
2: keyword.control.type.ts
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.export.ts
|
- meta_scope: meta.export.ts
|
||||||
- match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
|
- match: (?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))
|
||||||
@ -866,7 +868,7 @@ contexts:
|
|||||||
3: entity.name.function.ts variable.language.this.ts
|
3: entity.name.function.ts variable.language.this.ts
|
||||||
4: entity.name.function.ts
|
4: entity.name.function.ts
|
||||||
5: keyword.operator.optional.ts
|
5: keyword.operator.optional.ts
|
||||||
- match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*:)'
|
- match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*[:,]|$)'
|
||||||
captures:
|
captures:
|
||||||
1: storage.modifier.ts
|
1: storage.modifier.ts
|
||||||
2: keyword.operator.rest.ts
|
2: keyword.operator.rest.ts
|
||||||
@ -931,6 +933,10 @@ contexts:
|
|||||||
scope: keyword.operator.comparison.ts
|
scope: keyword.operator.comparison.ts
|
||||||
- match: <=|>=|<>|<|>
|
- match: <=|>=|<>|<|>
|
||||||
scope: keyword.operator.relational.ts
|
scope: keyword.operator.relational.ts
|
||||||
|
- match: '(\!)\s*(/)(?![/*])'
|
||||||
|
captures:
|
||||||
|
1: keyword.operator.logical.ts
|
||||||
|
2: keyword.operator.arithmetic.ts
|
||||||
- match: \!|&&|\|\||\?\?
|
- match: \!|&&|\|\||\?\?
|
||||||
scope: keyword.operator.logical.ts
|
scope: keyword.operator.logical.ts
|
||||||
- match: \&|~|\^|\|
|
- match: \&|~|\^|\|
|
||||||
@ -985,7 +991,7 @@ contexts:
|
|||||||
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
|
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
|
||||||
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
|
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
|
||||||
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
|
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
|
||||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
|
)(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|\}|$))
|
||||||
captures:
|
captures:
|
||||||
1: storage.modifier.ts
|
1: storage.modifier.ts
|
||||||
push:
|
push:
|
||||||
@ -1000,7 +1006,7 @@ contexts:
|
|||||||
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
|
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
|
||||||
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
|
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
|
||||||
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
|
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
|
||||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
|
)(?!\$))|(\#?[_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\.)*\')|(\"([^\"\\]|\\.)*\")|(\`([^\`\\]|\\.)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?<=\})
|
||||||
pop: true
|
pop: true
|
||||||
- include: variable-initializer
|
- include: variable-initializer
|
||||||
- include: type-annotation
|
- include: type-annotation
|
||||||
@ -1009,7 +1015,7 @@ contexts:
|
|||||||
- include: numeric-literal
|
- include: numeric-literal
|
||||||
- include: comment
|
- include: comment
|
||||||
- match: |-
|
- match: |-
|
||||||
(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
|
(?x)(\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
|
||||||
# function assignment |
|
# function assignment |
|
||||||
(=\s*(
|
(=\s*(
|
||||||
((async\s+)?(
|
((async\s+)?(
|
||||||
@ -1083,7 +1089,7 @@ contexts:
|
|||||||
1: meta.definition.property.ts entity.name.function.ts
|
1: meta.definition.property.ts entity.name.function.ts
|
||||||
2: keyword.operator.optional.ts
|
2: keyword.operator.optional.ts
|
||||||
3: keyword.operator.definiteassignment.ts
|
3: keyword.operator.definiteassignment.ts
|
||||||
- match: "[_$[:alpha:]][_$[:alnum:]]*"
|
- match: '\#?[_$[:alpha:]][_$[:alnum:]]*'
|
||||||
scope: meta.definition.property.ts variable.object.property.ts
|
scope: meta.definition.property.ts variable.object.property.ts
|
||||||
- match: \?
|
- match: \?
|
||||||
scope: keyword.operator.optional.ts
|
scope: keyword.operator.optional.ts
|
||||||
@ -1119,17 +1125,17 @@ contexts:
|
|||||||
- match: \*
|
- match: \*
|
||||||
scope: keyword.generator.asterisk.ts
|
scope: keyword.generator.asterisk.ts
|
||||||
function-call:
|
function-call:
|
||||||
- match: '(?=(((([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
|
- match: '(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
|
||||||
push:
|
push:
|
||||||
- match: '(?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
|
- match: '(?<=\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\)]))\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
|
||||||
pop: true
|
pop: true
|
||||||
- match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
|
- match: '(?=(([_$[:alpha:]][_$[:alnum:]]*)(\s*\??\.\s*(\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*))'
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.function-call.ts
|
- meta_scope: meta.function-call.ts
|
||||||
- match: '(?=\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
|
- match: '(?=\s*(?:(\?\.\s*)|(\!))?(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?\()'
|
||||||
pop: true
|
pop: true
|
||||||
- include: support-function-call-identifiers
|
- include: support-function-call-identifiers
|
||||||
- match: "([_$[:alpha:]][_$[:alnum:]]*)"
|
- match: '(\#?[_$[:alpha:]][_$[:alnum:]]*)'
|
||||||
scope: entity.name.function.ts
|
scope: entity.name.function.ts
|
||||||
- include: comment
|
- include: comment
|
||||||
- match: \?\.
|
- match: \?\.
|
||||||
@ -1225,12 +1231,12 @@ contexts:
|
|||||||
1: punctuation.accessor.ts
|
1: punctuation.accessor.ts
|
||||||
2: punctuation.accessor.optional.ts
|
2: punctuation.accessor.optional.ts
|
||||||
3: entity.name.function.ts
|
3: entity.name.function.ts
|
||||||
- match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
|
- match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
|
||||||
captures:
|
captures:
|
||||||
1: punctuation.accessor.ts
|
1: punctuation.accessor.ts
|
||||||
2: punctuation.accessor.optional.ts
|
2: punctuation.accessor.optional.ts
|
||||||
3: variable.other.constant.property.ts
|
3: variable.other.constant.property.ts
|
||||||
- match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([_$[:alpha:]][_$[:alnum:]]*)'
|
- match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(\#?[_$[:alpha:]][_$[:alnum:]]*)'
|
||||||
captures:
|
captures:
|
||||||
1: punctuation.accessor.ts
|
1: punctuation.accessor.ts
|
||||||
2: punctuation.accessor.optional.ts
|
2: punctuation.accessor.optional.ts
|
||||||
@ -1255,7 +1261,7 @@ contexts:
|
|||||||
0: meta.brace.round.ts
|
0: meta.brace.round.ts
|
||||||
pop: true
|
pop: true
|
||||||
- include: expression
|
- include: expression
|
||||||
- match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
|
- match: '(?<=\))\s*\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
|
||||||
captures:
|
captures:
|
||||||
0: punctuation.definition.string.begin.ts
|
0: punctuation.definition.string.begin.ts
|
||||||
push:
|
push:
|
||||||
@ -1268,11 +1274,12 @@ contexts:
|
|||||||
- include: regexp
|
- include: regexp
|
||||||
- include: statements
|
- include: statements
|
||||||
import-declaration:
|
import-declaration:
|
||||||
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
|
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type)(?!\s+from))?(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
|
||||||
captures:
|
captures:
|
||||||
1: keyword.control.export.ts
|
1: keyword.control.export.ts
|
||||||
2: storage.modifier.ts
|
2: storage.modifier.ts
|
||||||
3: keyword.control.import.ts
|
3: keyword.control.import.ts
|
||||||
|
4: keyword.control.type.ts
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.import.ts
|
- meta_scope: meta.import.ts
|
||||||
- match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
|
- match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
|
||||||
@ -1289,15 +1296,16 @@ contexts:
|
|||||||
- include: import-export-declaration
|
- include: import-export-declaration
|
||||||
- include: import-export-declaration
|
- include: import-export-declaration
|
||||||
import-equals-declaration:
|
import-equals-declaration:
|
||||||
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
|
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
|
||||||
captures:
|
captures:
|
||||||
1: keyword.control.export.ts
|
1: keyword.control.export.ts
|
||||||
2: storage.modifier.ts
|
2: storage.modifier.ts
|
||||||
3: keyword.control.import.ts
|
3: keyword.control.import.ts
|
||||||
4: variable.other.readwrite.alias.ts
|
4: keyword.control.type.ts
|
||||||
5: keyword.operator.assignment.ts
|
5: variable.other.readwrite.alias.ts
|
||||||
6: keyword.control.require.ts
|
6: keyword.operator.assignment.ts
|
||||||
7: meta.brace.round.ts
|
7: keyword.control.require.ts
|
||||||
|
8: meta.brace.round.ts
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.import-equals.external.ts
|
- meta_scope: meta.import-equals.external.ts
|
||||||
- match: \)
|
- match: \)
|
||||||
@ -1306,13 +1314,14 @@ contexts:
|
|||||||
pop: true
|
pop: true
|
||||||
- include: comment
|
- include: comment
|
||||||
- include: string
|
- include: string
|
||||||
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
|
- match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?:\s+(type))?\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
|
||||||
captures:
|
captures:
|
||||||
1: keyword.control.export.ts
|
1: keyword.control.export.ts
|
||||||
2: storage.modifier.ts
|
2: storage.modifier.ts
|
||||||
3: keyword.control.import.ts
|
3: keyword.control.import.ts
|
||||||
4: variable.other.readwrite.alias.ts
|
4: keyword.control.type.ts
|
||||||
5: keyword.operator.assignment.ts
|
5: variable.other.readwrite.alias.ts
|
||||||
|
6: keyword.operator.assignment.ts
|
||||||
push:
|
push:
|
||||||
- meta_scope: meta.import-equals.internal.ts
|
- meta_scope: meta.import-equals.internal.ts
|
||||||
- match: (?=;|$|^)
|
- match: (?=;|$|^)
|
||||||
@ -1720,9 +1729,9 @@ contexts:
|
|||||||
scope: support.class.ts
|
scope: support.class.ts
|
||||||
- match: |-
|
- match: |-
|
||||||
(?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
|
(?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
|
||||||
([[:upper:]][_$[:digit:][:upper:]]*) |
|
(\#?[[:upper:]][_$[:digit:][:upper:]]*) |
|
||||||
([_$[:alpha:]][_$[:alnum:]]*)
|
(\#?[_$[:alpha:]][_$[:alnum:]]*)
|
||||||
)(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
|
)(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
|
||||||
captures:
|
captures:
|
||||||
1: punctuation.accessor.ts
|
1: punctuation.accessor.ts
|
||||||
2: punctuation.accessor.optional.ts
|
2: punctuation.accessor.optional.ts
|
||||||
@ -1732,7 +1741,7 @@ contexts:
|
|||||||
(?x)(?:
|
(?x)(?:
|
||||||
([[:upper:]][_$[:digit:][:upper:]]*) |
|
([[:upper:]][_$[:digit:][:upper:]]*) |
|
||||||
([_$[:alpha:]][_$[:alnum:]]*)
|
([_$[:alpha:]][_$[:alnum:]]*)
|
||||||
)(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
|
)(?=\s*\??\.\s*\#?[_$[:alpha:]][_$[:alnum:]]*)
|
||||||
captures:
|
captures:
|
||||||
1: variable.other.constant.object.ts
|
1: variable.other.constant.object.ts
|
||||||
2: variable.other.object.ts
|
2: variable.other.object.ts
|
||||||
@ -1933,6 +1942,22 @@ contexts:
|
|||||||
0: meta.brace.round.ts
|
0: meta.brace.round.ts
|
||||||
pop: true
|
pop: true
|
||||||
- include: expression-inside-possibly-arrow-parens
|
- include: expression-inside-possibly-arrow-parens
|
||||||
|
- match: (?<=:)\s*(async)?\s*(?=\<\s*$)
|
||||||
|
captures:
|
||||||
|
1: storage.modifier.async.ts
|
||||||
|
push:
|
||||||
|
- match: (?<=\>)
|
||||||
|
pop: true
|
||||||
|
- include: type-parameters
|
||||||
|
- match: '(?<=\>)\s*(\()(?=\s*((([\{\[]\s*)?$)|((\{([^\{\}]|(\{[^\{\}]*\}))*\})\s*((:\s*\{?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))|((\[([^\[\]]|(\[[^\[\]]*\]))*\])\s*((:\s*\[?$)|((\s*([^<>\(\)\{\}]|\<([^<>]|\<[^<>]+\>)+\>|\([^\(\)]+\)|\{[^\{\}]+\})+\s*)?=\s*)))))'
|
||||||
|
captures:
|
||||||
|
1: meta.brace.round.ts
|
||||||
|
push:
|
||||||
|
- match: \)
|
||||||
|
captures:
|
||||||
|
0: meta.brace.round.ts
|
||||||
|
pop: true
|
||||||
|
- include: expression-inside-possibly-arrow-parens
|
||||||
- include: possibly-arrow-return-type
|
- include: possibly-arrow-return-type
|
||||||
- include: expression
|
- include: expression
|
||||||
- include: punctuation-comma
|
- include: punctuation-comma
|
||||||
@ -2172,7 +2197,7 @@ contexts:
|
|||||||
pop: true
|
pop: true
|
||||||
- include: string-character-escape
|
- include: string-character-escape
|
||||||
regex:
|
regex:
|
||||||
- match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
|
- match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[\()]|\\.|\[([^\]\\]|\\.)+\]|\(([^\)\\]|\\.)+\))+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
|
||||||
captures:
|
captures:
|
||||||
1: punctuation.definition.string.begin.ts
|
1: punctuation.definition.string.begin.ts
|
||||||
push:
|
push:
|
||||||
@ -2183,7 +2208,7 @@ contexts:
|
|||||||
2: keyword.other.ts
|
2: keyword.other.ts
|
||||||
pop: true
|
pop: true
|
||||||
- include: regexp
|
- include: regexp
|
||||||
- match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
|
- match: '((?<![_$[:alnum:])\]]|\+\+|--|}|\*\/)|((?<=^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case))\s*)\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/([gimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$]))'
|
||||||
captures:
|
captures:
|
||||||
0: punctuation.definition.string.begin.ts
|
0: punctuation.definition.string.begin.ts
|
||||||
push:
|
push:
|
||||||
@ -2301,8 +2326,6 @@ contexts:
|
|||||||
- match: (?=^)
|
- match: (?=^)
|
||||||
pop: true
|
pop: true
|
||||||
statements:
|
statements:
|
||||||
- include: string
|
|
||||||
- include: comment
|
|
||||||
- include: declaration
|
- include: declaration
|
||||||
- include: control-statement
|
- include: control-statement
|
||||||
- include: after-operator-block-as-object-literal
|
- include: after-operator-block-as-object-literal
|
||||||
@ -2310,6 +2333,8 @@ contexts:
|
|||||||
- include: label
|
- include: label
|
||||||
- include: expression
|
- include: expression
|
||||||
- include: punctuation-semicolon
|
- include: punctuation-semicolon
|
||||||
|
- include: string
|
||||||
|
- include: comment
|
||||||
string:
|
string:
|
||||||
- include: qstring-single
|
- include: qstring-single
|
||||||
- include: qstring-double
|
- include: qstring-double
|
||||||
@ -2659,20 +2684,20 @@ contexts:
|
|||||||
0: case-clause.expr.ts punctuation.definition.section.case-statement.ts
|
0: case-clause.expr.ts punctuation.definition.section.case-statement.ts
|
||||||
- include: statements
|
- include: statements
|
||||||
template:
|
template:
|
||||||
- match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
|
- match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
|
||||||
push:
|
push:
|
||||||
- meta_scope: string.template.ts
|
- meta_scope: string.template.ts
|
||||||
- match: (?=`)
|
- match: (?=`)
|
||||||
pop: true
|
pop: true
|
||||||
- match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
|
- match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
|
||||||
push:
|
push:
|
||||||
- match: '(?=(<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
|
- match: '(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)?`)'
|
||||||
pop: true
|
pop: true
|
||||||
- include: support-function-call-identifiers
|
- include: support-function-call-identifiers
|
||||||
- match: "([_$[:alpha:]][_$[:alnum:]]*)"
|
- match: "([_$[:alpha:]][_$[:alnum:]]*)"
|
||||||
scope: entity.name.function.tagged-template.ts
|
scope: entity.name.function.tagged-template.ts
|
||||||
- include: type-arguments
|
- include: type-arguments
|
||||||
- match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)`)'
|
- match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))(([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer|typeof|readonly)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[]|=>|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?<!=)\>))*(?<!=)\>)*(?<!=)>\s*)`)'
|
||||||
captures:
|
captures:
|
||||||
1: entity.name.function.tagged-template.ts
|
1: entity.name.function.tagged-template.ts
|
||||||
push:
|
push:
|
||||||
|
Loading…
Reference in New Issue
Block a user