Родитель
e2db601b62
Коммит
4407e8d570
|
@ -11,7 +11,7 @@ uuid: 805375ec-d614-41f5-8993-5843fe63ea82
|
|||
variables:
|
||||
#possiblyMultilineArrowExpressionBeforeEndOfLine: ({{typeParameters}})?\(
|
||||
possiblyMultilineArrow: ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) # during lookup treat ( followed by line end as arrow
|
||||
jsxTagOrAtrributeIdentifier: '[_$[:alpha:]][-$[:alnum:].]*'
|
||||
jsxTagOrAtrributeIdentifier: '[_$[:alpha:]][-_$[:alnum:].]*'
|
||||
jsxTagNamespace: (?:({{jsxTagOrAtrributeIdentifier}})(?<!\.|-)(:))?
|
||||
jsxTagName: \s*{{jsxTagNamespace}}((?:[a-z][a-z0-9]*|({{jsxTagOrAtrributeIdentifier}}))(?<!\.|-))
|
||||
jsxOpeningTagWithoutAttributes: (<){{jsxTagName}}?\s*(>)
|
||||
|
@ -164,7 +164,7 @@ repository:
|
|||
(?x)
|
||||
\s*
|
||||
(?:({{jsxTagOrAtrributeIdentifier}})(:))?
|
||||
([_$[:alpha:]][-$[:alnum:]]*)
|
||||
([_$[:alpha:]][-_$[:alnum:]]*)
|
||||
(?=\s|=|/?>|/\*|//)
|
||||
captures:
|
||||
'1': {name: entity.other.attribute-name.namespace.tsx}
|
||||
|
|
|
@ -8317,9 +8317,9 @@
|
|||
<key>jsx-tag-without-attributes-in-expression</key>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))</string>
|
||||
<string>(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))</string>
|
||||
<key>end</key>
|
||||
<string>(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))</string>
|
||||
<string>(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -8333,9 +8333,9 @@
|
|||
<key>name</key>
|
||||
<string>meta.tag.without-attributes.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)</string>
|
||||
<string>(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)</string>
|
||||
<key>end</key>
|
||||
<string>(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)</string>
|
||||
<string>(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -8418,9 +8418,9 @@
|
|||
<string>(?x)
|
||||
(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
|
||||
(?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
|
||||
(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))</string>
|
||||
(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))</string>
|
||||
<key>end</key>
|
||||
<string>(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))</string>
|
||||
<string>(?!(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
@ -8434,9 +8434,9 @@
|
|||
<key>name</key>
|
||||
<string>meta.tag.tsx</string>
|
||||
<key>begin</key>
|
||||
<string>(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))</string>
|
||||
<string>(?=(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))</string>
|
||||
<key>end</key>
|
||||
<string>(/>)|(?:(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))</string>
|
||||
<string>(/>)|(?:(</)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))?\s*(>))</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -8479,7 +8479,7 @@
|
|||
<array>
|
||||
<dict>
|
||||
<key>begin</key>
|
||||
<string>(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)</string>
|
||||
<string>(<)\s*(?:([_$[:alpha:]][-_$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-_$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -8681,8 +8681,8 @@
|
|||
<key>match</key>
|
||||
<string>(?x)
|
||||
\s*
|
||||
(?:([_$[:alpha:]][-$[:alnum:].]*)(:))?
|
||||
([_$[:alpha:]][-$[:alnum:]]*)
|
||||
(?:([_$[:alpha:]][-_$[:alnum:].]*)(:))?
|
||||
([_$[:alpha:]][-_$[:alnum:]]*)
|
||||
(?=\s|=|/?>|/\*|//)</string>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
<Test
|
||||
a=''
|
||||
b_c='111'
|
||||
d=''
|
||||
/>
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScriptReact.tmLanguage
|
||||
-----------------------------------
|
||||
><Test
|
||||
^
|
||||
source.tsx meta.tag.tsx punctuation.definition.tag.begin.tsx
|
||||
^^^^
|
||||
source.tsx meta.tag.tsx entity.name.tag.tsx support.class.component.tsx
|
||||
> a=''
|
||||
^^^^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx entity.other.attribute-name.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx keyword.operator.assignment.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx punctuation.definition.string.begin.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx punctuation.definition.string.end.tsx
|
||||
> b_c='111'
|
||||
^^^^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx
|
||||
^^^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx entity.other.attribute-name.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx keyword.operator.assignment.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx punctuation.definition.string.begin.tsx
|
||||
^^^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx punctuation.definition.string.end.tsx
|
||||
> d=''
|
||||
^^^^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx entity.other.attribute-name.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx keyword.operator.assignment.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx punctuation.definition.string.begin.tsx
|
||||
^
|
||||
source.tsx meta.tag.tsx meta.tag.attributes.tsx string.quoted.single.tsx punctuation.definition.string.end.tsx
|
||||
>/>
|
||||
^^
|
||||
source.tsx meta.tag.tsx punctuation.definition.tag.end.tsx
|
||||
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
><Test
|
||||
^
|
||||
source.ts keyword.operator.relational.ts
|
||||
^^^^
|
||||
source.ts variable.other.readwrite.ts
|
||||
> a=''
|
||||
^^^^
|
||||
source.ts
|
||||
^
|
||||
source.ts variable.other.readwrite.ts
|
||||
^
|
||||
source.ts keyword.operator.assignment.ts
|
||||
^
|
||||
source.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
||||
^
|
||||
source.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
||||
> b_c='111'
|
||||
^^^^
|
||||
source.ts
|
||||
^^^
|
||||
source.ts variable.other.readwrite.ts
|
||||
^
|
||||
source.ts keyword.operator.assignment.ts
|
||||
^
|
||||
source.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
||||
^^^
|
||||
source.ts string.quoted.single.ts
|
||||
^
|
||||
source.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
||||
> d=''
|
||||
^^^^
|
||||
source.ts
|
||||
^
|
||||
source.ts variable.other.readwrite.ts
|
||||
^
|
||||
source.ts keyword.operator.assignment.ts
|
||||
^
|
||||
source.ts string.quoted.single.ts punctuation.definition.string.begin.ts
|
||||
^
|
||||
source.ts string.quoted.single.ts punctuation.definition.string.end.ts
|
||||
>/>
|
||||
^
|
||||
source.ts keyword.operator.arithmetic.ts
|
||||
^
|
||||
source.ts keyword.operator.relational.ts
|
|
@ -0,0 +1,5 @@
|
|||
<Test
|
||||
a=''
|
||||
b_c='111'
|
||||
d=''
|
||||
/>
|
Загрузка…
Ссылка в новой задаче