File tree Expand file tree Collapse file tree 5 files changed +1202
-0
lines changed
Expand file tree Collapse file tree 5 files changed +1202
-0
lines changed Original file line number Diff line number Diff line change @@ -504,6 +504,7 @@ repository:
504504 - include : ' #comment'
505505 - include : ' #method-declaration'
506506 - include : ' #indexer-declaration'
507+ - include : ' #indexer-mapped-type-declaration'
507508 - include : ' #field-declaration'
508509 - include : ' #type-annotation'
509510 - begin : \.\.\.
@@ -617,6 +618,21 @@ repository:
617618 patterns :
618619 - include : ' #type-annotation'
619620
621+ indexer-mapped-type-declaration :
622+ name : meta.indexer.mappedtype.declaration.ts
623+ begin : (?:(?<!\.|\$)\b(readonly)\s*)?(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+
624+ beginCaptures :
625+ ' 1 ' : { name: storage.modifier.ts }
626+ ' 2 ' : { name: meta.brace.square.ts }
627+ ' 3 ' : { name: entity.name.type.ts }
628+ ' 4 ' : { name: keyword.operator.expression.in.ts }
629+ end : (\])\s*(\?\s*)?|$
630+ endCaptures :
631+ ' 1 ' : { name: meta.brace.square.ts }
632+ ' 2 ' : { name: keyword.operator.optional.ts }
633+ patterns :
634+ - include : ' #type'
635+
620636 function-declaration :
621637 name : meta.function.ts
622638 begin : (?<!\.|\$)\b(?:(export)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*
Original file line number Diff line number Diff line change 15911591 <key >include </key >
15921592 <string >#indexer-declaration </string >
15931593 </dict >
1594+ <dict >
1595+ <key >include </key >
1596+ <string >#indexer-mapped-type-declaration </string >
1597+ </dict >
15941598 <dict >
15951599 <key >include </key >
15961600 <string >#field-declaration </string >
19041908 </dict >
19051909 </array >
19061910 </dict >
1911+ <key >indexer-mapped-type-declaration </key >
1912+ <dict >
1913+ <key >name </key >
1914+ <string >meta.indexer.mappedtype.declaration.ts </string >
1915+ <key >begin </key >
1916+ <string >(?:(?< !\.|\$)\b(readonly)\s*)?(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+ </string >
1917+ <key >beginCaptures </key >
1918+ <dict >
1919+ <key >1 </key >
1920+ <dict >
1921+ <key >name </key >
1922+ <string >storage.modifier.ts </string >
1923+ </dict >
1924+ <key >2 </key >
1925+ <dict >
1926+ <key >name </key >
1927+ <string >meta.brace.square.ts </string >
1928+ </dict >
1929+ <key >3 </key >
1930+ <dict >
1931+ <key >name </key >
1932+ <string >entity.name.type.ts </string >
1933+ </dict >
1934+ <key >4 </key >
1935+ <dict >
1936+ <key >name </key >
1937+ <string >keyword.operator.expression.in.ts </string >
1938+ </dict >
1939+ </dict >
1940+ <key >end </key >
1941+ <string >(\])\s*(\?\s*)?|$ </string >
1942+ <key >endCaptures </key >
1943+ <dict >
1944+ <key >1 </key >
1945+ <dict >
1946+ <key >name </key >
1947+ <string >meta.brace.square.ts </string >
1948+ </dict >
1949+ <key >2 </key >
1950+ <dict >
1951+ <key >name </key >
1952+ <string >keyword.operator.optional.ts </string >
1953+ </dict >
1954+ </dict >
1955+ <key >patterns </key >
1956+ <array >
1957+ <dict >
1958+ <key >include </key >
1959+ <string >#type </string >
1960+ </dict >
1961+ </array >
1962+ </dict >
19071963 <key >function-declaration </key >
19081964 <dict >
19091965 <key >name </key >
Original file line number Diff line number Diff line change 15951595 <key >include </key >
15961596 <string >#indexer-declaration </string >
15971597 </dict >
1598+ <dict >
1599+ <key >include </key >
1600+ <string >#indexer-mapped-type-declaration </string >
1601+ </dict >
15981602 <dict >
15991603 <key >include </key >
16001604 <string >#field-declaration </string >
19081912 </dict >
19091913 </array >
19101914 </dict >
1915+ <key >indexer-mapped-type-declaration </key >
1916+ <dict >
1917+ <key >name </key >
1918+ <string >meta.indexer.mappedtype.declaration.tsx </string >
1919+ <key >begin </key >
1920+ <string >(?:(?< !\.|\$)\b(readonly)\s*)?(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+ </string >
1921+ <key >beginCaptures </key >
1922+ <dict >
1923+ <key >1 </key >
1924+ <dict >
1925+ <key >name </key >
1926+ <string >storage.modifier.tsx </string >
1927+ </dict >
1928+ <key >2 </key >
1929+ <dict >
1930+ <key >name </key >
1931+ <string >meta.brace.square.tsx </string >
1932+ </dict >
1933+ <key >3 </key >
1934+ <dict >
1935+ <key >name </key >
1936+ <string >entity.name.type.tsx </string >
1937+ </dict >
1938+ <key >4 </key >
1939+ <dict >
1940+ <key >name </key >
1941+ <string >keyword.operator.expression.in.tsx </string >
1942+ </dict >
1943+ </dict >
1944+ <key >end </key >
1945+ <string >(\])\s*(\?\s*)?|$ </string >
1946+ <key >endCaptures </key >
1947+ <dict >
1948+ <key >1 </key >
1949+ <dict >
1950+ <key >name </key >
1951+ <string >meta.brace.square.tsx </string >
1952+ </dict >
1953+ <key >2 </key >
1954+ <dict >
1955+ <key >name </key >
1956+ <string >keyword.operator.optional.tsx </string >
1957+ </dict >
1958+ </dict >
1959+ <key >patterns </key >
1960+ <array >
1961+ <dict >
1962+ <key >include </key >
1963+ <string >#type </string >
1964+ </dict >
1965+ </array >
1966+ </dict >
19111967 <key >function-declaration </key >
19121968 <dict >
19131969 <key >name </key >
You can’t perform that action at this time.
0 commit comments