File tree Expand file tree Collapse file tree 11 files changed +627
-22
lines changed
Expand file tree Collapse file tree 11 files changed +627
-22
lines changed Original file line number Diff line number Diff line change @@ -229,12 +229,37 @@ repository:
229229
230230 enum-declaration :
231231 name : meta.enum.declaration.ts
232- match : (?<!\.|\$)(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)
233- captures :
232+ begin : (?<!\.|\$)(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)
233+ beginCaptures :
234234 ' 1 ' : { name: keyword.control.export.ts }
235235 ' 2 ' : { name: storage.modifier.ts}
236236 ' 3 ' : { name: storage.type.enum.ts }
237237 ' 4 ' : { name: entity.name.type.enum.ts }
238+ end : (?<=\})
239+ patterns :
240+ - include : ' #comment'
241+ - begin : \{
242+ beginCaptures :
243+ ' 0 ' : { name: punctuation.definition.block.ts }
244+ end : \}
245+ endCaptures :
246+ ' 0 ' : { name: punctuation.definition.block.ts }
247+ patterns :
248+ - include : ' #comment'
249+ - begin : ([_$[:alpha:]][_$[:alnum:]]*)
250+ beginCaptures :
251+ ' 0 ' : { name: variable.other.enummember.ts }
252+ end : (?=,|\}|$)
253+ patterns :
254+ - include : ' #comment'
255+ - include : ' #variable-initializer'
256+ - begin : (?=(?:(?:\'[^']*\')|(?:\"[^"]*\")))
257+ end : (?=,|\}|$)
258+ patterns :
259+ - include : ' #string'
260+ - include : ' #comment'
261+ - include : ' #variable-initializer'
262+ - include : ' #punctuation-comma'
238263
239264 namespace-declaration :
240265 name : meta.namespace.declaration.ts
Original file line number Diff line number Diff line change 725725 <dict >
726726 <key >name </key >
727727 <string >meta.enum.declaration.ts </string >
728- <key >match </key >
728+ <key >begin </key >
729729 <string >(?< !\.|\$)(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*) </string >
730- <key >captures </key >
730+ <key >beginCaptures </key >
731731 <dict >
732732 <key >1 </key >
733733 <dict >
750750 <string >entity.name.type.enum.ts </string >
751751 </dict >
752752 </dict >
753+ <key >end </key >
754+ <string >(?< =\}) </string >
755+ <key >patterns </key >
756+ <array >
757+ <dict >
758+ <key >include </key >
759+ <string >#comment </string >
760+ </dict >
761+ <dict >
762+ <key >begin </key >
763+ <string >\{ </string >
764+ <key >beginCaptures </key >
765+ <dict >
766+ <key >0 </key >
767+ <dict >
768+ <key >name </key >
769+ <string >punctuation.definition.block.ts </string >
770+ </dict >
771+ </dict >
772+ <key >end </key >
773+ <string >\} </string >
774+ <key >endCaptures </key >
775+ <dict >
776+ <key >0 </key >
777+ <dict >
778+ <key >name </key >
779+ <string >punctuation.definition.block.ts </string >
780+ </dict >
781+ </dict >
782+ <key >patterns </key >
783+ <array >
784+ <dict >
785+ <key >include </key >
786+ <string >#comment </string >
787+ </dict >
788+ <dict >
789+ <key >begin </key >
790+ <string >([_$[:alpha:]][_$[:alnum:]]*) </string >
791+ <key >beginCaptures </key >
792+ <dict >
793+ <key >0 </key >
794+ <dict >
795+ <key >name </key >
796+ <string >variable.other.enummember.ts </string >
797+ </dict >
798+ </dict >
799+ <key >end </key >
800+ <string >(?=,|\}|$) </string >
801+ <key >patterns </key >
802+ <array >
803+ <dict >
804+ <key >include </key >
805+ <string >#comment </string >
806+ </dict >
807+ <dict >
808+ <key >include </key >
809+ <string >#variable-initializer </string >
810+ </dict >
811+ </array >
812+ </dict >
813+ <dict >
814+ <key >begin </key >
815+ <string >(?=(?:(?:\'[^']*\')|(?:\"[^"]*\"))) </string >
816+ <key >end </key >
817+ <string >(?=,|\}|$) </string >
818+ <key >patterns </key >
819+ <array >
820+ <dict >
821+ <key >include </key >
822+ <string >#string </string >
823+ </dict >
824+ <dict >
825+ <key >include </key >
826+ <string >#comment </string >
827+ </dict >
828+ <dict >
829+ <key >include </key >
830+ <string >#variable-initializer </string >
831+ </dict >
832+ </array >
833+ </dict >
834+ <dict >
835+ <key >include </key >
836+ <string >#punctuation-comma </string >
837+ </dict >
838+ </array >
839+ </dict >
840+ </array >
753841 </dict >
754842 <key >namespace-declaration </key >
755843 <dict >
Original file line number Diff line number Diff line change 729729 <dict >
730730 <key >name </key >
731731 <string >meta.enum.declaration.tsx </string >
732- <key >match </key >
732+ <key >begin </key >
733733 <string >(?< !\.|\$)(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*) </string >
734- <key >captures </key >
734+ <key >beginCaptures </key >
735735 <dict >
736736 <key >1 </key >
737737 <dict >
754754 <string >entity.name.type.enum.tsx </string >
755755 </dict >
756756 </dict >
757+ <key >end </key >
758+ <string >(?< =\}) </string >
759+ <key >patterns </key >
760+ <array >
761+ <dict >
762+ <key >include </key >
763+ <string >#comment </string >
764+ </dict >
765+ <dict >
766+ <key >begin </key >
767+ <string >\{ </string >
768+ <key >beginCaptures </key >
769+ <dict >
770+ <key >0 </key >
771+ <dict >
772+ <key >name </key >
773+ <string >punctuation.definition.block.tsx </string >
774+ </dict >
775+ </dict >
776+ <key >end </key >
777+ <string >\} </string >
778+ <key >endCaptures </key >
779+ <dict >
780+ <key >0 </key >
781+ <dict >
782+ <key >name </key >
783+ <string >punctuation.definition.block.tsx </string >
784+ </dict >
785+ </dict >
786+ <key >patterns </key >
787+ <array >
788+ <dict >
789+ <key >include </key >
790+ <string >#comment </string >
791+ </dict >
792+ <dict >
793+ <key >begin </key >
794+ <string >([_$[:alpha:]][_$[:alnum:]]*) </string >
795+ <key >beginCaptures </key >
796+ <dict >
797+ <key >0 </key >
798+ <dict >
799+ <key >name </key >
800+ <string >variable.other.enummember.tsx </string >
801+ </dict >
802+ </dict >
803+ <key >end </key >
804+ <string >(?=,|\}|$) </string >
805+ <key >patterns </key >
806+ <array >
807+ <dict >
808+ <key >include </key >
809+ <string >#comment </string >
810+ </dict >
811+ <dict >
812+ <key >include </key >
813+ <string >#variable-initializer </string >
814+ </dict >
815+ </array >
816+ </dict >
817+ <dict >
818+ <key >begin </key >
819+ <string >(?=(?:(?:\'[^']*\')|(?:\"[^"]*\"))) </string >
820+ <key >end </key >
821+ <string >(?=,|\}|$) </string >
822+ <key >patterns </key >
823+ <array >
824+ <dict >
825+ <key >include </key >
826+ <string >#string </string >
827+ </dict >
828+ <dict >
829+ <key >include </key >
830+ <string >#comment </string >
831+ </dict >
832+ <dict >
833+ <key >include </key >
834+ <string >#variable-initializer </string >
835+ </dict >
836+ </array >
837+ </dict >
838+ <dict >
839+ <key >include </key >
840+ <string >#punctuation-comma </string >
841+ </dict >
842+ </array >
843+ </dict >
844+ </array >
757845 </dict >
758846 <key >namespace-declaration </key >
759847 <dict >
Original file line number Diff line number Diff line change @@ -28,30 +28,30 @@ Grammar: TypeScript.tmLanguage
2828 ^^^^^
2929 source.ts meta.enum.declaration.ts entity.name.type.enum.ts
3030 ^
31- source.ts
31+ source.ts meta.enum.declaration.ts
3232 ^
33- source.ts meta.block .ts punctuation.definition.block.ts
33+ source.ts meta.enum.declaration .ts punctuation.definition.block.ts
3434 ^^
35- source.ts meta.block .ts
35+ source.ts meta.enum.declaration .ts
3636> A,
3737 ^^^^
38- source.ts meta.block .ts
38+ source.ts meta.enum.declaration .ts
3939 ^
40- source.ts meta.block. ts constant .other.ts
40+ source.ts meta.enum.declaration. ts variable .other.enummember .ts
4141 ^
42- source.ts meta.block .ts punctuation.separator.comma.ts
42+ source.ts meta.enum.declaration .ts punctuation.separator.comma.ts
4343 ^^
44- source.ts meta.block .ts
44+ source.ts meta.enum.declaration .ts
4545> B
4646 ^^^^
47- source.ts meta.block .ts
47+ source.ts meta.enum.declaration .ts
4848 ^
49- source.ts meta.block. ts constant .other.ts
50- ^^
51- source.ts meta.block .ts
49+ source.ts meta.enum.declaration. ts variable .other.enummember .ts
50+ ^
51+ source.ts meta.enum.declaration .ts
5252>}
5353 ^
54- source.ts meta.block .ts punctuation.definition.block.ts
54+ source.ts meta.enum.declaration .ts punctuation.definition.block.ts
5555 ^^
5656 source.ts
5757>
You can’t perform that action at this time.
0 commit comments