Родитель
5cfc64ba64
Коммит
94b95df7ef
|
@ -588,10 +588,10 @@ repository:
|
|||
|
||||
field-declaration:
|
||||
name: meta.field.declaration.ts
|
||||
begin: (?x)(?<!\()(?:{{startOfIdentifier}}(readonly)\s+)?(?=\s*{{propertyName}}\s*(\?\s*)?(=|:|;|$))
|
||||
begin: (?x)(?<!\()(?:{{startOfIdentifier}}(readonly)\s+)?(?=\s*{{propertyName}}\s*(\?\s*)?(=|:|;|,|$))
|
||||
beginCaptures:
|
||||
'1': { name: storage.modifier.ts }
|
||||
end: (?x)(?=\}|;|,|$|(^(?!\s*{{propertyName}}\s*(\?\s*)?(=|:|;|$))))|(?<=\})
|
||||
end: (?x)(?=\}|;|,|$|(^(?!\s*{{propertyName}}\s*(\?\s*)?(=|:|;|,|$))))|(?<=\})
|
||||
patterns:
|
||||
- include: '#variable-initializer'
|
||||
- include: '#type-annotation'
|
||||
|
|
|
@ -1791,7 +1791,7 @@
|
|||
(?:\b[0-9][0-9_]*(\.)\B)| # 1.
|
||||
(?:\B(\.)[0-9][0-9_]*\b)| # .1
|
||||
(?:\b[0-9][0-9_]*\b(?!\.)) # 1
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|$))</string>
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|,|$))</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -1810,7 +1810,7 @@
|
|||
(?:\b[0-9][0-9_]*(\.)\B)| # 1.
|
||||
(?:\B(\.)[0-9][0-9_]*\b)| # .1
|
||||
(?:\b[0-9][0-9_]*\b(?!\.)) # 1
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|$))))|(?<=\})</string>
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|,|$))))|(?<=\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
@ -1795,7 +1795,7 @@
|
|||
(?:\b[0-9][0-9_]*(\.)\B)| # 1.
|
||||
(?:\B(\.)[0-9][0-9_]*\b)| # .1
|
||||
(?:\b[0-9][0-9_]*\b(?!\.)) # 1
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|$))</string>
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|,|$))</string>
|
||||
<key>beginCaptures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
|
@ -1814,7 +1814,7 @@
|
|||
(?:\b[0-9][0-9_]*(\.)\B)| # 1.
|
||||
(?:\B(\.)[0-9][0-9_]*\b)| # .1
|
||||
(?:\b[0-9][0-9_]*\b(?!\.)) # 1
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|$))))|(?<=\})</string>
|
||||
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:|;|,|$))))|(?<=\})</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
original file
|
||||
-----------------------------------
|
||||
interface DagEdge {
|
||||
a?,
|
||||
b
|
||||
}
|
||||
var a = 1;
|
||||
-----------------------------------
|
||||
|
||||
Grammar: TypeScript.tmLanguage
|
||||
-----------------------------------
|
||||
>interface DagEdge {
|
||||
^^^^^^^^^
|
||||
source.ts meta.interface.ts storage.type.interface.ts
|
||||
^
|
||||
source.ts meta.interface.ts
|
||||
^^^^^^^
|
||||
source.ts meta.interface.ts entity.name.type.interface.ts
|
||||
^
|
||||
source.ts meta.interface.ts
|
||||
^
|
||||
source.ts meta.interface.ts punctuation.definition.block.ts
|
||||
> a?,
|
||||
^^^^
|
||||
source.ts meta.interface.ts meta.field.declaration.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.field.declaration.ts meta.definition.property.ts variable.object.property.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.field.declaration.ts keyword.operator.optional.ts
|
||||
^
|
||||
source.ts meta.interface.ts punctuation.separator.comma.ts
|
||||
> b
|
||||
^^^^
|
||||
source.ts meta.interface.ts meta.field.declaration.ts
|
||||
^
|
||||
source.ts meta.interface.ts meta.field.declaration.ts meta.definition.property.ts variable.object.property.ts
|
||||
>}
|
||||
^
|
||||
source.ts meta.interface.ts punctuation.definition.block.ts
|
||||
>var a = 1;
|
||||
^^^
|
||||
source.ts meta.var.expr.ts storage.type.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts keyword.operator.assignment.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts
|
||||
^
|
||||
source.ts meta.var.expr.ts constant.numeric.decimal.ts
|
||||
^
|
||||
source.ts punctuation.terminator.statement.ts
|
|
@ -0,0 +1,5 @@
|
|||
interface DagEdge {
|
||||
a?,
|
||||
b
|
||||
}
|
||||
var a = 1;
|
Загрузка…
Ссылка в новой задаче