Update typescript grammar (June 9)

This commit is contained in:
Martin Aeschlimann
2016-06-15 09:44:25 +02:00
parent d8de4d4695
commit 700d73620a
5 changed files with 475 additions and 96 deletions

View File

@@ -193,7 +193,7 @@
<key>control-statement</key>
<dict>
<key>match</key>
<string>(?&lt;!\.)\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|case|default)\b</string>
<string>(?&lt;!\.)\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|case|default|yield)\b</string>
<key>name</key>
<string>keyword.control.js</string>
</dict>
@@ -1815,6 +1815,110 @@
</dict>
</array>
</dict>
<key>ternary-expression</key>
<dict>
<key>begin</key>
<string>(?=\?)</string>
<key>end</key>
<string>(?=$|[;,])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#ternary-operator</string>
</dict>
<dict>
<key>include</key>
<string>#ternary-expression-type</string>
</dict>
</array>
</dict>
<key>ternary-expression-type</key>
<dict>
<key>name</key>
<string>meta.expression.js</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#regex</string>
</dict>
<dict>
<key>include</key>
<string>#template</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#literal</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression</string>
</dict>
<dict>
<key>include</key>
<string>#ternary-expression</string>
</dict>
<dict>
<key>include</key>
<string>#import-operator</string>
</dict>
<dict>
<key>include</key>
<string>#expression-operator</string>
</dict>
<dict>
<key>include</key>
<string>#imply-operator</string>
</dict>
<dict>
<key>include</key>
<string>#relational-operator</string>
</dict>
<dict>
<key>include</key>
<string>#arithmetic-operator</string>
</dict>
<dict>
<key>include</key>
<string>#logic-operator</string>
</dict>
<dict>
<key>include</key>
<string>#assignment-operator</string>
</dict>
<dict>
<key>include</key>
<string>#type-primitive</string>
</dict>
<dict>
<key>include</key>
<string>#function-call</string>
</dict>
</array>
</dict>
<key>ternary-operator</key>
<dict>
<key>begin</key>
<string>(\?)</string>
<key>end</key>
<string>(:)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#ternary-expression-type</string>
</dict>
</array>
</dict>
<key>this-literal</key>
<dict>
<key>match</key>
@@ -2206,6 +2310,10 @@
<string>meta.var-single-variable.expr.js</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#ternary-expression</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>