Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2017-07-01 07:52:08 +0300
committerMike Krüger <mkrueger@xamarin.com>2017-07-01 07:52:08 +0300
commit0702c8da0e94145526ea87152db33598ddd9996e (patch)
treef5d67c2b53e287725c62ac3f8916eb22d1ae485d /main/src/core/MonoDevelop.Ide
parentd18941a518ce94f10719ec0a344a0fa07fe8d1db (diff)
parent46923f26c51dd27d7f2c9905b46f5f69f44ff199 (diff)
Merge branch 'master' into master-fix57352
Diffstat (limited to 'main/src/core/MonoDevelop.Ide')
-rw-r--r--main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml17
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/CommandSearchCategory.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtPopup.cs90
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtThemedPopup.cs9
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs9
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs15
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/OldFormat.cs11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/Sublime3Format.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/TextMateFormat.cs87
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/bat/syntaxes/BatchFile.tmLanguage22
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/OSSREADME.json2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/language-configuration.json10
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/package.json2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c++.json29
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c.json1557
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/OSSREADME.json25
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/npm-shrinkwrap.json24
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/package.json151
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/OSSREADME.json2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/package.json7
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/OSSREADME.json97
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/language-configuration.json13
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/npm-shrinkwrap.json39
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/package.json150
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/syntaxes/html.json322
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/java/package.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/OSSREADME.json187
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/npm-shrinkwrap.json16
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/package.json236
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/syntaxes/JavaScript.tmLanguage.json4196
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/tsconfig.json10
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/OSSREADME.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/npm-shrinkwrap.json40
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/package.json48
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/syntaxes/JSON.tmLanguage2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/OSSREADME.json6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/language-configuration.json6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/package.json5
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/package.json9
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/syntaxes/Makefile.json8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/OSSREADME.json22
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/package.json52
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/package.json3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/syntaxes/PowershellSyntax.tmLanguage4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/package.json2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json27
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/OSSREADME.json261
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/language-configuration.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/npm-shrinkwrap.json27
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.json750
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.nls.json56
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/Readme.md11
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScript.tmLanguage.json3919
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScriptReact.tmLanguage.json4192
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/tsconfig.json25
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/OSSREADME.json26
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/package.json3
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xml.json23
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xsl.json8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/CSharp/C#.sublime-syntax2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/Markdown/Markdown.sublime-syntax115
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/DarkStyle.json6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/FallbackStyle.json6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/LightStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/TangoStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/VisualStudioStyle.json4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.TextMate/TextMateFoldingTextEditorExtension.cs8
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs12
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs6
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs7
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs4
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs2
-rw-r--r--main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs6
102 files changed, 13882 insertions, 3290 deletions
diff --git a/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml b/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
index 323c147401..b716716444 100644
--- a/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
+++ b/main/src/core/MonoDevelop.Ide/ExtensionModel/MonoDevelop.Ide.addin.xml
@@ -234,7 +234,11 @@
<ExtensionNode name = "Assembly" type = "MonoDevelop.Core.AddIns.AssemblyExtensionNode" />
</ExtensionPoint>
- <!-- Extensions -->
+ <ExtensionPoint path="/MonoDevelop/Ide/Composition">
+ <ExtensionNode name = "Assembly" type = "MonoDevelop.Core.AddIns.AssemblyExtensionNode" />
+ </ExtensionPoint>
+
+ <!-- Extensions -->
<Extension path = "/MonoDevelop/Core/Applications">
<Application id = "gsetup"
@@ -394,4 +398,15 @@
<Extension path="/MonoDevelop/Ide/TypeService/PlatformMefHostServices">
<Assembly file="Microsoft.VisualStudio.Text.Logic.dll"/>
</Extension>
+
+ <Extension path="/MonoDevelop/Ide/Composition">
+ <Assembly file="Microsoft.CodeAnalysis.Features.dll" />
+ <Assembly file="Microsoft.CodeAnalysis.Workspaces.dll" />
+ <Assembly file="Microsoft.CodeAnalysis.CSharp.Features.dll" />
+ <Assembly file="Microsoft.CodeAnalysis.CSharp.Workspaces.dll" />
+ <Assembly file="Microsoft.CodeAnalysis.VisualBasic.Features.dll" />
+ <Assembly file="Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll" />
+ <Assembly file="MonoDevelop.Ide.dll"/>
+ </Extension>
+
</ExtensionModel>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs
index 62efba8339..70104d068b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.AutoTest/AutoTestSession.cs
@@ -98,7 +98,7 @@ namespace MonoDevelop.Components.AutoTest
public void ExecuteCommand (object cmd, object dataItem = null, CommandSource source = CommandSource.Unknown)
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
AutoTestService.CommandManager.DispatchCommand (cmd, dataItem, null, source);
});
}
@@ -114,7 +114,7 @@ namespace MonoDevelop.Components.AutoTest
}
syncEvent.Reset ();
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
try {
res = del ();
} catch (Exception ex) {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs
index 02cb1e98d4..1caba3c247 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/PlaceholderWindow.cs
@@ -106,7 +106,7 @@ namespace MonoDevelop.Components.DockNotebook
protected override void OnDestroyed ()
{
base.OnDestroyed ();
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
titleWindow.Destroy ();
});
IdeApp.Workbench.UnlockActiveWindowChangeEvent ();
@@ -465,7 +465,7 @@ namespace MonoDevelop.Components.DockNotebook
public void Close ()
{
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
placeholder.Destroy ();
});
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs
index 723e7ae6a8..0f2a5fa8a9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Docking/DockFrameTopLevel.cs
@@ -128,7 +128,7 @@ namespace MonoDevelop.Components.Docking
if (ContainerWindow != null) {
if (!repositionRequested && width != 0 && height != 0) {
repositionRequested = true;
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
var pos = frame.GetScreenCoordinates (new Gdk.Point (x, y));
DesktopService.PlaceWindow (ContainerWindow, pos.X, pos.Y, width, height);
repositionRequested = false;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs
index 8bd896d2bc..397b972fb2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs
@@ -85,7 +85,7 @@ namespace MonoDevelop.Components.Extensions
if (data.Message.CancellationToken.CanBeCanceled) {
data.Message.CancellationToken.Register (delegate {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (alertDialog != null) {
alertDialog.Respond (Gtk.ResponseType.DeleteEvent);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/CommandSearchCategory.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/CommandSearchCategory.cs
index 1ed6108fa4..cd690cdb02 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/CommandSearchCategory.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.MainToolbar/CommandSearchCategory.cs
@@ -47,9 +47,11 @@ namespace MonoDevelop.Components.MainToolbar
static CommandSearchCategory ()
{
- allCommands = IdeApp.CommandService.GetCommands ().Select(cmd =>
- Tuple.Create (cmd, cmd.DisplayName)
- ).ToList();
+ var hiddenCategory = GettextCatalog.GetString ("Hidden");
+ allCommands = IdeApp.CommandService.GetCommands ()
+ .Where (cmd => (cmd as ActionCommand)?.CommandArray != true && cmd.Category != hiddenCategory)
+ .Select(cmd => Tuple.Create (cmd, cmd.DisplayName))
+ .ToList();
}
public CommandSearchCategory () : base (GettextCatalog.GetString("Commands"))
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs
index b91d4aa448..25e57dc339 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/ContextMenuExtensionsMac.cs
@@ -74,7 +74,7 @@ namespace MonoDevelop.Components
parent.GrabFocus ();
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
// Explicitly release the grab because the menu is shown on the mouse position, and the widget doesn't get the mouse release event
Gdk.Pointer.Ungrab (Gtk.Global.CurrentEventTime);
var nsview = MonoDevelop.Components.Mac.GtkMacInterop.GetNSView (parent);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs
index 89b3d87c8c..f1f8f2aea3 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/GtkUtil.cs
@@ -926,7 +926,7 @@ namespace MonoDevelop.Components
// Delay the call to the leave handler since the pointer may be
// entering a child widget, in which case the event doesn't have to be fired
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o2, a2) => {
if (!Inside)
LeaveHandler ();
});
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtPopup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtPopup.cs
index 84e46ad201..6a7a264098 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtPopup.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtPopup.cs
@@ -70,6 +70,8 @@ namespace MonoDevelop.Components
get { return eventProvided; }
}
+ protected Toolkit Toolkit { get; private set; }
+
protected virtual void CurrentPositionChanged ()
{
}
@@ -89,6 +91,7 @@ namespace MonoDevelop.Components
public XwtPopup (PopupType type) : base (type)
{
currentPosition = targetPosition = PopupPosition.Top;
+ Toolkit = Toolkit.CurrentEngine;
}
public void ShowPopup (Control widget, Rectangle targetRectangle, PopupPosition position)
@@ -205,34 +208,51 @@ namespace MonoDevelop.Components
protected Rectangle GetScreenCoordinates (Rectangle targetRect)
{
- // TODO: Fix cross toolkit coords
- var gtkTarget = target as Gtk.Widget;
- if (gtkTarget != null)
- return GtkUtil.ToScreenCoordinates (gtkTarget, gtkTarget.GdkWindow, targetRect.ToGdkRectangle ()).ToXwtRectangle ();
- #if MAC
- var nsTarget = target as AppKit.NSView;
- if (nsTarget != null) {
- var lo = nsTarget.ConvertPointToView (new CoreGraphics.CGPoint ((nfloat)targetRect.X, (nfloat)targetRect.Y), null);
- lo = nsTarget.Window.ConvertRectToScreen (new CoreGraphics.CGRect (lo, CoreGraphics.CGSize.Empty)).Location;
- var r = new CoreGraphics.CGRect (lo.X, lo.Y, 0, nsTarget.IsFlipped ? 0 : nsTarget.Frame.Height);
-
- var desktopBounds = new Rectangle ();
- foreach (var s in AppKit.NSScreen.Screens) {
- var sr = s.Frame;
- desktopBounds = desktopBounds.Union (new Rectangle (sr.X, sr.Y, sr.Width, sr.Height));
- }
-
- r.Y = (nfloat)desktopBounds.Height - r.Y - r.Height;
- if (desktopBounds.Y < 0)
- r.Y += (nfloat)desktopBounds.Y;
- return new Rectangle (r.X, r.Y, r.Width, r.Height);
+ var screenLocation = Point.Zero;
+ Toolkit targetToolkit = null;
+ var xwtTarget = target as Widget;
+ if (xwtTarget != null) {
+ screenLocation = xwtTarget.ConvertToScreenCoordinates (targetRect.Location);
+ targetToolkit = xwtTarget.Surface.ToolkitEngine;
+ } else {
+ targetToolkit = GetToolkitForWidget (target);
+ screenLocation = targetToolkit.GetScreenBounds (target).Offset (targetRect.Location).Location;
}
+
+ screenLocation = TranslateCoordinates (targetToolkit, Toolkit, screenLocation);
+ return new Rectangle (screenLocation, targetRect.Size);
+ }
+
+ static Point TranslateCoordinates (Xwt.Toolkit sourceToolkit, Xwt.Toolkit targetToolkit, Point point)
+ {
+ if (sourceToolkit == targetToolkit)
+ return point;
+ sourceToolkit.Invoke (() => {
+ var desktopBounds = Desktop.Bounds;
+ point.X -= desktopBounds.X;
+ point.Y -= desktopBounds.Y;
+ });
+ targetToolkit.Invoke (() => {
+ var desktopBounds = Desktop.Bounds;
+ point.X += desktopBounds.X;
+ point.Y += desktopBounds.Y;
+ });
+ return point;
+ }
+
+ static Toolkit GetToolkitForWidget (object nativeWidget)
+ {
+ if (nativeWidget is Gtk.Widget)
+ return Toolkit.Load (ToolkitType.Gtk);
+ #if MAC
+ if (nativeWidget is AppKit.NSView)
+ return Toolkit.Load (ToolkitType.XamMac);
#endif
- var xwtTarget = target as Widget;
- if (xwtTarget != null)
- return GtkUtil.ToScreenCoordinates (xwtTarget, targetRect).ToXwtRectangle ();
-
- return Rectangle.Zero;
+ #if WIN32
+ if (nativeWidget is System.Windows.FrameworkElement)
+ return Toolkit.Load (ToolkitType.Wpf);
+ #endif
+ throw new NotSupportedException (string.Format ("Widget of type '{0}' does not belong to a supported Toolkit.", nativeWidget.GetType ()));
}
protected Size GetParentSize ()
@@ -259,8 +279,13 @@ namespace MonoDevelop.Components
protected Rectangle GetUsableMonitorGeometry (Rectangle targetRect)
{
- var screen = Desktop.GetScreenAtLocation (targetRect.Location);
- return screen?.VisibleBounds ?? Rectangle.Zero;
+ var rect = Rectangle.Zero;
+ Toolkit.Invoke (() => {
+ var screen = Desktop.GetScreenAtLocation (targetRect.Location);
+ if (screen != null)
+ rect = screen.VisibleBounds;
+ });
+ return rect;
}
Rectangle cachedBounds;
@@ -287,18 +312,14 @@ namespace MonoDevelop.Components
targetRect = newTargetRect.Value;
Rectangle currentRect = targetRect;
- if (targetWindowOrigin.X < 0)
- return;
- var x = targetWindowOrigin.X;
- var y = targetWindowOrigin.Y;
PopupPosition position = targetPosition;
CurrentPosition = targetPosition;
var psize = GetParentSize ();
if (eventProvided) {
- currentRect.X = x;
- currentRect.Y = y;
+ currentRect.X = targetWindowOrigin.X;
+ currentRect.Y = targetWindowOrigin.Y;
currentRect.Width = currentRect.Height = 1;
} else {
if (currentRect.IsEmpty)
@@ -346,6 +367,7 @@ namespace MonoDevelop.Components
CurrentPosition = position;
// Calculate base coordinate
+ double x = 0, y = 0;
switch ((PopupPosition)((int)position & 0x0f)) {
case PopupPosition.Top:
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtThemedPopup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtThemedPopup.cs
index 5b3c067a85..14116a5597 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtThemedPopup.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/Xwt/XwtThemedPopup.cs
@@ -138,18 +138,14 @@ namespace MonoDevelop.Components
TargetRectangle = newTargetRect.Value;
Rectangle currentRect = TargetRectangle;
- if (TargetWindowOrigin.X < 0)
- return;
- var x = TargetWindowOrigin.X;
- var y = TargetWindowOrigin.Y;
PopupPosition position = TargetPosition;
CurrentPosition = TargetPosition;
var psize = GetParentSize ();
if (EventProvided) {
- currentRect.X = x;
- currentRect.Y = y;
+ currentRect.X = TargetWindowOrigin.X;
+ currentRect.Y = TargetWindowOrigin.Y;
currentRect.Width = currentRect.Height = 1;
} else {
if (currentRect.IsEmpty)
@@ -197,6 +193,7 @@ namespace MonoDevelop.Components
CurrentPosition = position;
// Calculate base coordinate
+ double x = 0, y = 0;
switch ((PopupPosition)((int)position & 0x0f)) {
case PopupPosition.Top:
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
index cf4f433066..e18811b6cd 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CodeCompletion/ListWidget.cs
@@ -544,8 +544,9 @@ namespace MonoDevelop.Ide.CodeCompletion
} else {
xpos = iconTextSpacing;
}
+ bool drawIconAsSelected = SelectionEnabled && item == SelectedItemIndex;
string markup = win.DataProvider.HasMarkup (item) ? (win.DataProvider.GetMarkup (item) ?? "&lt;null&gt;") : GLib.Markup.EscapeText (win.DataProvider.GetText (item) ?? "<null>");
- string description = win.DataProvider.GetDescription (item, item == SelectedItemIndex);
+ string description = win.DataProvider.GetDescription (item, drawIconAsSelected);
if (string.IsNullOrEmpty (description)) {
layout.SetMarkup (markup);
@@ -582,7 +583,7 @@ namespace MonoDevelop.Ide.CodeCompletion
Xwt.Drawing.Image icon = win.DataProvider.GetIcon (item);
int iconHeight, iconWidth;
if (icon != null) {
- if (item == SelectedItemIndex)
+ if (drawIconAsSelected)
icon = icon.WithStyles ("sel");
iconWidth = (int)icon.Width;
iconHeight = (int)icon.Height;
@@ -617,7 +618,7 @@ namespace MonoDevelop.Ide.CodeCompletion
context.DrawImage (this, icon, xpos, iypos);
xpos += iconTextSpacing;
}
- context.SetSourceColor ((item == SelectedItemIndex ? Styles.CodeCompletion.SelectionTextColor : Styles.CodeCompletion.TextColor).ToCairoColor ());
+ context.SetSourceColor ((drawIconAsSelected ? Styles.CodeCompletion.SelectionTextColor : Styles.CodeCompletion.TextColor).ToCairoColor ());
var textXPos = xpos + iconWidth + 2;
context.MoveTo (textXPos, typos);
layout.Width = (int)((Allocation.Width - textXPos) * Pango.Scale.PangoScale);
@@ -634,7 +635,7 @@ namespace MonoDevelop.Ide.CodeCompletion
layout.Attributes = null;
}
- string rightText = win.DataProvider.GetRightSideDescription (item, item == SelectedItemIndex);
+ string rightText = win.DataProvider.GetRightSideDescription (item, drawIconAsSelected);
if (!string.IsNullOrEmpty (rightText)) {
layout.SetMarkup (rightText);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs
index 78f806b31b..70ac6f0610 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Composition/CompositionManager.cs
@@ -31,6 +31,8 @@ using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using Microsoft.CodeAnalysis.Host;
+using Microsoft.CodeAnalysis.Host.Mef;
using Microsoft.VisualStudio.Composition;
using Mono.Addins;
using MonoDevelop.Core;
@@ -88,6 +90,8 @@ namespace MonoDevelop.Ide.Composition
public RuntimeComposition RuntimeComposition { get; private set; }
public IExportProviderFactory ExportProviderFactory { get; private set; }
public ExportProvider ExportProvider { get; private set; }
+ public HostServices HostServices { get; private set; }
+ public System.ComponentModel.Composition.Hosting.ExportProvider ExportProviderV1 { get; private set; }
internal CompositionManager ()
{
@@ -109,6 +113,7 @@ namespace MonoDevelop.Ide.Composition
var assemblies = new HashSet<Assembly> ();
ReadAssembliesFromAddins (assemblies, "/MonoDevelop/Ide/TypeService/PlatformMefHostServices");
ReadAssembliesFromAddins (assemblies, "/MonoDevelop/Ide/TypeService/MefHostServices");
+ ReadAssembliesFromAddins (assemblies, "/MonoDevelop/Ide/Composition");
// spawn discovery tasks in parallel for each assembly
var tasks = new List<Task<DiscoveredParts>> (assemblies.Count);
@@ -131,12 +136,20 @@ namespace MonoDevelop.Ide.Composition
if (!configuration.CompositionErrors.IsEmpty) {
// capture the errors in an array for easier debugging
var errors = configuration.CompositionErrors.ToArray ();
- configuration.ThrowOnErrors ();
+
+ // For now while we're still transitioning to VSMEF it's useful to work
+ // even if the composition has some errors. TODO: re-enable this.
+ //var messages = errors.SelectMany (e => e).Select (e => e.Message);
+ //var text = string.Join (Environment.NewLine, messages);
+ //Xwt.Clipboard.SetText (text);
+ //configuration.ThrowOnErrors ();
}
RuntimeComposition = RuntimeComposition.CreateRuntimeComposition (configuration);
ExportProviderFactory = RuntimeComposition.CreateExportProviderFactory ();
ExportProvider = ExportProviderFactory.CreateExportProvider ();
+ HostServices = MefV1HostServices.Create (ExportProvider.AsExportProvider ());
+ ExportProviderV1 = NetFxAdapters.AsExportProvider (ExportProvider);
}
void ReadAssembliesFromAddins (HashSet<Assembly> assemblies, string extensionPath)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
index a4a2ca67f8..0975a375f9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.CustomTools/CustomToolService.cs
@@ -432,7 +432,7 @@ namespace MonoDevelop.Ide.CustomTools
FileService.NotifyFileChanged (result.GeneratedFilePath);
// add file to project, update file properties, etc
- Gtk.Application.Invoke (async delegate {
+ Gtk.Application.Invoke (async (o, args) => {
bool projectChanged = false;
if (genFile == null) {
genFile = file.Project.AddFile (result.GeneratedFilePath, result.OverrideBuildAction);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs
index 1b8a22291b..76e692de88 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/AbstractUsagesExtension.cs
@@ -145,7 +145,7 @@ namespace MonoDevelop.Ide.Editor.Extension
}
var list = await GetReferencesAsync (result, token);
if (!token.IsCancellationRequested) {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (!token.IsCancellationRequested)
ShowReferences (list);
});
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs
index 71a91bfd24..b95e323c55 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/BraceMatcherTextEditorExtension.cs
@@ -164,7 +164,7 @@ namespace MonoDevelop.Ide.Editor.Extension
}
if (token.IsCancellationRequested)
return;
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
if (token.IsCancellationRequested)
return;
Editor.UpdateBraceMatchingResult (result);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs
index 1334966ce9..e28e21a33f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/ErrorHandlerTextEditorExtension.cs
@@ -151,7 +151,7 @@ namespace MonoDevelop.Ide.Editor.Extension
return;
try {
var errors = await parsedDocument.GetErrorsAsync(token).ConfigureAwait (false);
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
if (token.IsCancellationRequested || isDisposed)
return;
RemoveErrorUndelinesResetTimerId ();
@@ -232,7 +232,7 @@ namespace MonoDevelop.Ide.Editor.Extension
}
if (token.IsCancellationRequested)
return;
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
if (token.IsCancellationRequested || isDisposed)
return;
tasks = newTasks.ToImmutable ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs
index 0ad4db604e..d2e252b50e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Extension/FoldingTextEditorExtension.cs
@@ -139,7 +139,7 @@ namespace MonoDevelop.Ide.Editor.Extension
if (firstTime) {
Editor.SetFoldings (foldSegments);
} else {
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
if (!token.IsCancellationRequested)
Editor.SetFoldings (foldSegments);
});
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/OldFormat.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/OldFormat.cs
index ec18c94a11..151d7a4a2a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/OldFormat.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/OldFormat.cs
@@ -268,6 +268,17 @@ namespace MonoDevelop.Ide.Editor.Highlighting
settings.Add (new ThemeSetting ("HTML Element Name", new List<string> { "entity.name.tag.html" }, ConvertChunkStyle (colorScheme.HtmlElementName)));
settings.Add (new ThemeSetting ("HTML Entity", new List<string> { "constant.character.entity.html" }, ConvertChunkStyle (colorScheme.HtmlEntity)));
+ var style = ConvertChunkStyle (colorScheme.PlainText);
+ style ["fontStyle"] = "bold";
+ settings.Add (new ThemeSetting ("Bold Markup", new List<string> { "markup.bold" }, style));
+
+ style = ConvertChunkStyle (colorScheme.PlainText);
+ style ["fontStyle"] = "italic";
+ settings.Add (new ThemeSetting ("Italic Markup", new List<string> { "markup.italic" }, style));
+
+ settings.Add (new ThemeSetting ("markup.emoji", new List<string> { "markup.emoji" }, ConvertChunkStyle (colorScheme.Preprocessor)));
+ settings.Add (new ThemeSetting ("markup.link", new List<string> { "markup.link" }, ConvertChunkStyle (colorScheme.UserTypesInterfaces)));
+
return new EditorTheme (colorScheme.Name, settings);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/Sublime3Format.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/Sublime3Format.cs
index fce41cd17b..db4d092e1b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/Sublime3Format.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/Sublime3Format.cs
@@ -790,6 +790,14 @@ namespace MonoDevelop.Ide.Editor.Highlighting
groupNumber--;
skipRecordChar = true;
}
+ if (i + 1 >= regex.Length)
+ break;
+ next = regex [i + 1];
+ if (next == '+' || next == '*') {
+ result.Append ("*");
+ i++;
+ continue;
+ }
break;
case ')':
if (escape)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/TextMateFormat.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/TextMateFormat.cs
index fb565ca9d3..3f4cdeb927 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/TextMateFormat.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/Formats/TextMateFormat.cs
@@ -304,7 +304,6 @@ namespace MonoDevelop.Ide.Editor.Highlighting
var name = (dictionary ["name"] as PString)?.Value;
var scope = (dictionary ["scopeName"] as PString)?.Value;
-
var fileTypesArray = dictionary ["fileTypes"] as PArray;
if (fileTypesArray != null) {
foreach (var type in fileTypesArray.OfType<PString> ()) {
@@ -322,25 +321,7 @@ namespace MonoDevelop.Ide.Editor.Highlighting
var repository = dictionary ["repository"] as PDictionary;
if (repository != null) {
- foreach (var kv in repository) {
- string contextName = kv.Key;
- var includes = new List<object> ();
-
- var contents = kv.Value as PDictionary;
- if (contents != null) {
- var newMatch = ReadMatch (contents);
- if (newMatch != null) {
- includes.Add (newMatch);
- } else {
- patternsArray = contents ["patterns"] as PArray;
- if (patternsArray != null) {
- ReadPatterns (patternsArray, includes);
- }
- }
- }
-
- contexts.Add (new SyntaxContext (contextName, includes));
- }
+ ReadRepository (repository, contexts);
}
// var uuid = (dictionary ["uuid"] as PString)?.Value;
@@ -348,6 +329,35 @@ namespace MonoDevelop.Ide.Editor.Highlighting
return new SyntaxHighlightingDefinition (name, scope, firstLineMatch, hideFromUser == true, extensions, contexts);
}
+ private static void ReadRepository (PDictionary repository, List<SyntaxContext> contexts)
+ {
+ foreach (var kv in repository) {
+ string contextName = kv.Key;
+ var includes = new List<object> ();
+ var contents = kv.Value as PDictionary;
+ if (contents != null) {
+ var newMatch = ReadMatch (contents);
+ if (newMatch != null) {
+ includes.Add (newMatch);
+ } else {
+ var patternsArray = contents ["patterns"] as PArray;
+ if (patternsArray != null) {
+ ReadPatterns (patternsArray, includes);
+ }
+
+ var repository2 = contents ["repository"] as PDictionary;
+ if (repository2 != null)
+ ReadRepository (repository2, contexts);
+
+ }
+ }
+
+ contexts.Add (new SyntaxContext (contextName, includes));
+
+
+ }
+ }
+
static void ReadPatterns (PArray patternsArray, List<object> includesAndMatches)
{
foreach (var type in patternsArray) {
@@ -370,6 +380,7 @@ namespace MonoDevelop.Ide.Editor.Highlighting
var newMatch = ReadMatch (dict);
if (newMatch != null)
includesAndMatches.Add (newMatch);
+
}
}
@@ -422,12 +433,40 @@ namespace MonoDevelop.Ide.Editor.Highlighting
}
+ var whileLoop = (dict ["while"] as PString)?.Value;
+ endCaptures = null;
+ endScope = new List<string> ();
+ if (whileLoop != null) {
+ captureDict = dict ["endCaptures"] as PDictionary;
+ if (captureDict != null)
+ endCaptures = ReadCaptureDictionary (captureDict);
+
+ var list = new List<object> ();
+ if (whileLoop != null)
+ list.Add (new SyntaxMatch ("^(?!" + Sublime3Format.CompileRegex (whileLoop) +")", endScope, endCaptures ?? captures, null, true, null, null));
+ var patternsArray = dict ["patterns"] as PArray;
+ if (patternsArray != null) {
+ ReadPatterns (patternsArray, list);
+ }
+
+ List<string> metaContent = null;
+ var contentScope = (dict ["contentName"] as PString)?.Value;
+ if (contentScope != null) {
+ metaContent = new List<string> { contentScope };
+ }
+
+ var ctx = new SyntaxContext ("__generated begin/while capture context", list, metaScope: metaContent);
+
+ pushContext = new AnonymousMatchContextReference (ctx);
+ }
+
return new SyntaxMatch (Sublime3Format.CompileRegex (begin), matchScope, beginCaptures ?? captures, pushContext, false, null, null);
}
var match = (dict ["match"] as PString)?.Value;
if (match == null)
return null;
+
return new SyntaxMatch (Sublime3Format.CompileRegex (match), matchScope, captures, pushContext, false, null, null);
}
@@ -476,16 +515,22 @@ namespace MonoDevelop.Ide.Editor.Highlighting
switch (type) {
case "string":
return new PString (f.Value);
+ case "boolean":
+ return new PBoolean (string.Equals ("true", f.Value, StringComparison.OrdinalIgnoreCase));
case "array":
return new PArray (new List<PObject> (f.Elements ().Select (Convert)));
case "object":
var val = new PDictionary ();
foreach (var subElement in f.Elements ()) {
var name = subElement.Name.LocalName;
+ if (string.IsNullOrEmpty (name))
+ continue;
if (name == "item")
name = subElement.Attribute ("item").Value;
if (!val.ContainsKey (name)) {
- val.Add (name, Convert (subElement));
+ var converted = Convert (subElement);
+ if (converted != null)
+ val.Add (name, converted);
} else {
LoggingService.LogWarning ("Warning while converting json highlighting to textmate 'key' " + name + " is duplicated in : " + f);
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/bat/syntaxes/BatchFile.tmLanguage b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/bat/syntaxes/BatchFile.tmLanguage
index 4990963640..7f0a106142 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/bat/syntaxes/BatchFile.tmLanguage
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/bat/syntaxes/BatchFile.tmLanguage
@@ -74,13 +74,18 @@
<key>1</key>
<dict>
<key>name</key>
- <string>variable.parameter.loop.begin.shell</string>
+ <string>variable.other.parsetime.begin.shell</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>variable.other.parsetime.end.shell</string>
</dict>
</dict>
<key>name</key>
- <string>variable.parameter.loop.dosbatch</string>
+ <string>variable.other.parsetime.dosbatch</string>
<key>match</key>
- <string>(?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z]</string>
+ <string>(%)[^%]+(%)|(%%)[^%]+(%%)</string>
</dict>
<dict>
<key>captures</key>
@@ -88,18 +93,13 @@
<key>1</key>
<dict>
<key>name</key>
- <string>variable.other.parsetime.begin.shell</string>
- </dict>
- <key>2</key>
- <dict>
- <key>name</key>
- <string>variable.other.parsetime.end.shell</string>
+ <string>variable.parameter.loop.begin.shell</string>
</dict>
</dict>
<key>name</key>
- <string>variable.other.parsetime.dosbatch</string>
+ <string>variable.parameter.loop.dosbatch</string>
<key>match</key>
- <string>(%)[^%]+(%)</string>
+ <string>(?i)(%%)(~(?:f|d|p|n|x|s|a|t|z|\$[^:]*:)*)?[a-z]</string>
</dict>
<dict>
<key>captures</key>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/OSSREADME.json
index 58859a1b77..5137487d2e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/OSSREADME.json
@@ -2,7 +2,7 @@
[
{
"name": "atom/language-c",
- "version": "0.51.3",
+ "version": "0.0.0",
"license": "MIT",
"repositoryURL": "https://github.com/atom/language-c",
"description": "The files syntaxes/c.json and syntaxes/c++.json were derived from the Atom package https://atom.io/packages/language-c which was originally converted from the C TextMate bundle https://github.com/textmate/c.tmbundle."
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/language-configuration.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/language-configuration.json
index 2c89643f39..86530b6007 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/language-configuration.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/language-configuration.json
@@ -9,11 +9,11 @@
["(", ")"]
],
"autoClosingPairs": [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"],
- ["\"", "\""],
- ["'", "'"]
+ { "open": "[", "close": "]" },
+ { "open": "{", "close": "}" },
+ { "open": "(", "close": ")" },
+ { "open": "'", "close": "'", "notIn": ["string", "comment"] },
+ { "open": "\"", "close": "\"", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/package.json
index d83ade9439..ce8f3d711a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/package.json
@@ -15,7 +15,7 @@
},
{
"id": "cpp",
- "extensions": [ ".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx", ".h", ".mm", ".ino", ".inl" ],
+ "extensions": [ ".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx", ".h", ".ino", ".inl" ],
"aliases": [ "C++", "Cpp", "cpp"],
"configuration": "./language-configuration.json"
}],
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c++.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c++.json
index 8e715c6b3f..bc627e3a03 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c++.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c++.json
@@ -1,4 +1,9 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c%2B%2B.cson",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"scopeName": "source.cpp",
"fileTypes": [
"cc",
@@ -54,7 +59,7 @@
},
{
"match": "\\bnullptr\\b",
- "name": "variable.language.cpp"
+ "name": "constant.language.cpp"
},
{
"match": "\\btemplate\\b\\s*",
@@ -65,6 +70,10 @@
"name": "keyword.operator.cast.cpp"
},
{
+ "match": "::",
+ "name": "punctuation.separator.namespace.access.cpp"
+ },
+ {
"match": "\\b(and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|alignof|alignas)\\b",
"name": "keyword.operator.cpp"
},
@@ -144,13 +153,13 @@
"begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.section.block.begin.c"
+ "name": "punctuation.section.block.begin.bracket.curly.c"
}
},
"end": "\\}",
"endCaptures": {
"0": {
- "name": "punctuation.section.block.end.c"
+ "name": "punctuation.section.block.end.bracket.curly.c"
}
},
"name": "meta.block.cpp",
@@ -318,13 +327,13 @@
"begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.section.block.begin.cpp"
+ "name": "punctuation.section.block.begin.bracket.curly.cpp"
}
},
"end": "(\\})(\\s*\\n)?",
"endCaptures": {
"1": {
- "name": "punctuation.section.block.end.cpp"
+ "name": "punctuation.section.block.end.bracket.curly.cpp"
},
"2": {
"name": "invalid.illegal.you-forgot-semicolon.cpp"
@@ -361,13 +370,13 @@
"begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.section.block.begin.c"
+ "name": "punctuation.section.block.begin.bracket.curly.c"
}
},
"end": "\\}|(?=\\s*#\\s*endif\\b)",
"endCaptures": {
"0": {
- "name": "punctuation.section.block.end.c"
+ "name": "punctuation.section.block.end.bracket.curly.c"
}
},
"patterns": [
@@ -421,6 +430,9 @@
{
"match": "\\\\x\\h+",
"name": "constant.character.escape.cpp"
+ },
+ {
+ "include": "source.c#string_placeholder"
}
]
},
@@ -450,6 +462,5 @@
}
]
}
- },
- "version": "https://github.com/atom/language-c/commit/80db38512efabb3030d600a8d8f8b6d91abbc96b"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c.json
index 8c481e575a..b83b31ad22 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/cpp/syntaxes/c.json
@@ -1,4 +1,9 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/atom/language-c/blob/master/grammars/c.cson",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"scopeName": "source.c",
"fileTypes": [
"c",
@@ -14,7 +19,7 @@
"include": "#preprocessor-rule-disabled"
},
{
- "include": "#preprocessor-rule-other"
+ "include": "#preprocessor-rule-conditional"
},
{
"include": "#comments"
@@ -24,8 +29,7 @@
"name": "keyword.control.c"
},
{
- "match": "\\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\b",
- "name": "storage.type.c"
+ "include": "#storage_types"
},
{
"match": "\\b(const|extern|register|restrict|static|volatile|inline)\\b",
@@ -57,7 +61,7 @@
"include": "#strings"
},
{
- "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_$][\\w$]*)) # macro name\n(?:\n (\\()\n (\n \\s* \\g<id> \\s* # first argument\n ((,) \\s* \\g<id> \\s*)* # additional arguments\n (?:\\.\\.\\.)? # varargs ellipsis?\n )\n (\\))\n)?",
+ "begin": "(?x)\n^\\s* ((\\#)\\s*define) \\s+ # define\n((?<id>[a-zA-Z_$][\\w$]*)) # macro name\n(?:\n (\\()\n (\n \\s* \\g<id> \\s* # first argument\n ((,) \\s* \\g<id> \\s*)* # additional arguments\n (?:\\.\\.\\.)? # varargs ellipsis?\n )\n (\\))\n)?",
"beginCaptures": {
"1": {
"name": "keyword.control.directive.define.c"
@@ -85,7 +89,7 @@
"name": "meta.preprocessor.macro.c",
"patterns": [
{
- "include": "$base"
+ "include": "#preprocessor-rule-define-line-contents"
}
]
},
@@ -99,16 +103,22 @@
"name": "punctuation.definition.directive.c"
}
},
- "end": "(?<!\\\\)(?=\\n)",
+ "end": "(?<!\\\\)(?=\\n)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))",
"name": "meta.preprocessor.diagnostic.c",
"patterns": [
{
+ "include": "#comments"
+ },
+ {
+ "include": "#strings"
+ },
+ {
"include": "#line_continuation_character"
}
]
},
{
- "begin": "^\\s*((#)\\s*(include|import))\\b\\s*",
+ "begin": "^\\s*((#)\\s*(include(?:_next)?|import))\\b\\s*",
"beginCaptures": {
"1": {
"name": "keyword.control.directive.$3.c"
@@ -183,31 +193,57 @@
]
},
{
- "begin": "^\\s*(?:((#)\\s*(?:elif|else|if|ifdef|ifndef))|((#)\\s*(pragma|undef)))\\b",
+ "begin": "^\\s*(?:((#)\\s*undef))\\b",
"beginCaptures": {
"1": {
- "name": "keyword.control.directive.conditional.c"
+ "name": "keyword.control.directive.undef.c"
},
"2": {
"name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "match": "[a-zA-Z_$][\\w$]*",
+ "name": "entity.name.function.preprocessor.c"
},
- "3": {
- "name": "keyword.control.directive.$5.c"
+ {
+ "include": "#line_continuation_character"
+ }
+ ]
+ },
+ {
+ "begin": "^\\s*(?:((#)\\s*pragma))\\b",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.directive.pragma.c"
},
- "4": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
"end": "(?=(?://|/\\*))|(?<!\\\\)(?=\\n)",
- "name": "meta.preprocessor.c",
+ "name": "meta.preprocessor.pragma.c",
"patterns": [
{
+ "include": "#strings"
+ },
+ {
+ "match": "[a-zA-Z_$][\\w\\-$]*",
+ "name": "entity.other.attribute-name.pragma.preprocessor.c"
+ },
+ {
+ "include": "#numbers"
+ },
+ {
"include": "#line_continuation_character"
}
]
},
{
- "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b",
+ "match": "\\b(u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|div_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b",
"name": "support.type.sys-types.c"
},
{
@@ -234,38 +270,39 @@
"include": "#block"
},
{
- "begin": "(?x)\n(?:\n ^ |\n (?:\n (?=\\s)(?<!else|new|return)(?<=\\w) # word + space before name\n |\n (?=\\s*[A-Za-z_])(?<!&&)(?<=[*&>]) # type modifier before name\n )\n)\n(\\s*)(?!(while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\\s*\\()\n(\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(?=\\()",
- "beginCaptures": {
- "1": {
- "name": "punctuation.whitespace.function.leading.c"
- },
- "3": {
- "name": "entity.name.function.c"
- },
- "4": {
- "name": "punctuation.definition.parameters.c"
- }
- },
- "end": "(?<=\\})|(?=#)|(;)",
+ "include": "#parens"
+ },
+ {
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "end": "(?<=\\))(?!\\w)",
"name": "meta.function.c",
"patterns": [
{
- "include": "#comments"
- },
- {
- "include": "#parens"
- },
- {
- "match": "\\b(const)\\b",
- "name": "storage.modifier.c"
- },
- {
- "include": "#block"
+ "include": "#function-innards"
}
]
},
{
"include": "#line_continuation_character"
+ },
+ {
+ "match": "(\\[)|(\\])",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.begin.bracket.square.c"
+ },
+ "2": {
+ "name": "punctuation.definition.end.bracket.square.c"
+ }
+ }
+ },
+ {
+ "match": ";",
+ "name": "punctuation.terminator.statement.c"
+ },
+ {
+ "match": ",",
+ "name": "punctuation.separator.delimiter.c"
}
],
"repository": {
@@ -281,21 +318,21 @@
"name": "variable.other.member.c"
}
},
- "match": "((\\.)|(->))([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\()"
+ "match": "((\\.)|(->))\\s*(([a-zA-Z_][a-zA-Z_0-9]*)\\b(?!\\s*\\())?"
},
"block": {
"patterns": [
{
- "begin": "\\{",
+ "begin": "{",
"beginCaptures": {
"0": {
- "name": "punctuation.section.block.begin.c"
+ "name": "punctuation.section.block.begin.bracket.curly.c"
}
},
- "end": "\\}|(?=\\s*#\\s*endif\\b)",
+ "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)",
"endCaptures": {
"0": {
- "name": "punctuation.section.block.end.c"
+ "name": "punctuation.section.block.end.bracket.curly.c"
}
},
"name": "meta.block.c",
@@ -316,10 +353,7 @@
"include": "#preprocessor-rule-disabled-block"
},
{
- "include": "#preprocessor-rule-other-block"
- },
- {
- "include": "#sizeof"
+ "include": "#preprocessor-rule-conditional-block"
},
{
"include": "#access"
@@ -343,7 +377,26 @@
"name": "meta.initialization.c"
},
{
- "include": "#block"
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.block.begin.bracket.curly.c"
+ }
+ },
+ "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.block.end.bracket.curly.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block_innards"
+ }
+ ]
+ },
+ {
+ "include": "#parens-block"
},
{
"include": "$base"
@@ -351,19 +404,14 @@
]
},
"c_function_call": {
- "captures": {
- "1": {
- "name": "punctuation.whitespace.function-call.leading.c"
- },
- "2": {
- "name": "support.function.any-method.c"
- },
- "4": {
- "name": "punctuation.definition.parameters.c"
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\\s*\\()\n(?=\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "end": "(?<=\\))(?!\\w)",
+ "name": "meta.function-call.c",
+ "patterns": [
+ {
+ "include": "#function-call-innards"
}
- },
- "match": "(?x)\n(?:\n (?=\\s)\n (?:(?<=else|new|return) | (?<!\\w)) (\\s+)\n)?\n\n# Actual name\n(\n \\b\n (?!\n (while|for|do|if|else|switch|catch|enumerate|return|sizeof|r?iterate)\n \\s* \\(\n )\n (?:(?!NS)[A-Za-z_][A-Za-z0-9_]*+\\b | ::)++\n)\n\\s*(\\() # Opening bracket",
- "name": "meta.function-call.c"
+ ]
},
"comments": {
"patterns": [
@@ -420,7 +468,7 @@
"name": "punctuation.definition.comment.cpp"
}
},
- "end": "\\n",
+ "end": "(?=\\n)",
"name": "comment.line.double-slash.cpp",
"patterns": [
{
@@ -458,7 +506,7 @@
"line_continuation_character": {
"patterns": [
{
- "match": "(\\\\)\\s*\\n",
+ "match": "(\\\\)\\n",
"captures": {
"1": {
"name": "constant.character.escape.line-continuation.c"
@@ -470,7 +518,7 @@
"numbers": {
"patterns": [
{
- "match": "\\b((0(x|X)[0-9a-fA-F]*)|(0(b|B)[01]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
+ "match": "\\b((0(x|X)[0-9a-fA-F]([0-9a-fA-F']*[0-9a-fA-F])?)|(0(b|B)[01]([01']*[01])?)|(([0-9]([0-9']*[0-9])?\\.?[0-9]*([0-9']*[0-9])?)|(\\.[0-9]([0-9']*[0-9])?))((e|E)(\\+|-)?[0-9]([0-9']*[0-9])?)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b",
"name": "constant.numeric.c"
}
]
@@ -479,26 +527,44 @@
"begin": "\\(",
"beginCaptures": {
"0": {
- "name": "punctuation.section.parens.begin.c"
+ "name": "punctuation.section.parens.begin.bracket.round.c"
}
},
"end": "\\)",
"endCaptures": {
"0": {
- "name": "punctuation.section.parens.end.c"
+ "name": "punctuation.section.parens.end.bracket.round.c"
}
},
- "name": "meta.parens.c",
"patterns": [
{
"include": "$base"
}
]
},
+ "parens-block": {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.c"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#block_innards"
+ }
+ ]
+ },
"pragma-mark": {
"captures": {
"1": {
- "name": "meta.preprocessor.c"
+ "name": "meta.preprocessor.pragma.c"
},
"2": {
"name": "keyword.control.directive.pragma.pragma-mark.c"
@@ -507,399 +573,1116 @@
"name": "punctuation.definition.directive.c"
},
"4": {
- "name": "meta.toc-list.pragma-mark.c"
+ "name": "entity.name.tag.pragma-mark.c"
}
},
"match": "^\\s*(((#)\\s*pragma\\s+mark)\\s+(.*))",
"name": "meta.section"
},
- "preprocessor-rule-disabled": {
- "begin": "^\\s*(((#)if)\\s+(0)\\b).*",
- "beginCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
+ "operators": {
+ "patterns": [
+ {
+ "match": "(?<![\\w$])(sizeof)(?![\\w$])",
+ "name": "keyword.operator.sizeof.c"
},
- "2": {
- "name": "keyword.control.directive.conditional.c"
+ {
+ "match": "--",
+ "name": "keyword.operator.decrement.c"
},
- "3": {
- "name": "punctuation.definition.directive.c"
+ {
+ "match": "\\+\\+",
+ "name": "keyword.operator.increment.c"
},
- "4": {
- "name": "constant.numeric.preprocessor.c"
- }
- },
- "end": "^\\s*(((#)\\s*endif)\\b)",
- "endCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
+ {
+ "match": "%=|\\+=|-=|\\*=|(?<!\\()/=",
+ "name": "keyword.operator.assignment.compound.c"
},
- "2": {
- "name": "keyword.control.directive.conditional.c"
+ {
+ "match": "&=|\\^=|<<=|>>=|\\|=",
+ "name": "keyword.operator.assignment.compound.bitwise.c"
+ },
+ {
+ "match": "<<|>>",
+ "name": "keyword.operator.bitwise.shift.c"
+ },
+ {
+ "match": "!=|<=|>=|==|<|>",
+ "name": "keyword.operator.comparison.c"
+ },
+ {
+ "match": "&&|!|\\|\\|",
+ "name": "keyword.operator.logical.c"
+ },
+ {
+ "match": "&|\\||\\^|~",
+ "name": "keyword.operator.c"
+ },
+ {
+ "match": "=",
+ "name": "keyword.operator.assignment.c"
+ },
+ {
+ "match": "%|\\*|/|-|\\+",
+ "name": "keyword.operator.c"
},
- "3": {
- "name": "punctuation.definition.directive.c"
- }
- },
- "patterns": [
{
- "begin": "^\\s*(((#)\\s*else)\\b)",
+ "begin": "\\?",
"beginCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
+ "0": {
+ "name": "keyword.operator.ternary.c"
+ }
+ },
+ "end": ":",
+ "applyEndPatternLast": true,
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#access"
},
- "2": {
- "name": "keyword.control.directive.conditional.c"
+ {
+ "include": "#libc"
},
- "3": {
- "name": "punctuation.definition.directive.c"
+ {
+ "include": "#c_function_call"
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "strings": {
+ "patterns": [
+ {
+ "begin": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.c"
}
},
- "end": "(?=^\\s*#\\s*endif\\b)",
+ "end": "\"",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.c"
+ }
+ },
+ "name": "string.quoted.double.c",
"patterns": [
{
- "include": "$base"
+ "include": "#string_escaped_char"
+ },
+ {
+ "include": "#string_placeholder"
+ },
+ {
+ "include": "#line_continuation_character"
}
]
},
{
- "begin": "\\G",
- "end": "(?=^\\s*#\\s*(else|endif)\\b)",
- "contentName": "comment.block.preprocessor.if-branch",
+ "begin": "'",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.c"
+ }
+ },
+ "end": "'",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.c"
+ }
+ },
+ "name": "string.quoted.single.c",
"patterns": [
{
- "include": "#disabled"
+ "include": "#string_escaped_char"
},
{
- "include": "#pragma-mark"
+ "include": "#line_continuation_character"
}
]
}
]
},
- "preprocessor-rule-disabled-block": {
- "begin": "^\\s*(((#)if)\\s+(0)\\b).*",
- "beginCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
- },
- "2": {
- "name": "keyword.control.directive.conditional.c"
- },
- "3": {
- "name": "punctuation.definition.directive.c"
+ "string_escaped_char": {
+ "patterns": [
+ {
+ "match": "(?x)\\\\ (\n\\\\ |\n[abefnprtv'\"?] |\n[0-3]\\d{,2} |\n[4-7]\\d? |\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
+ "name": "constant.character.escape.c"
},
- "4": {
- "name": "constant.numeric.preprocessor.c"
+ {
+ "match": "\\\\.",
+ "name": "invalid.illegal.unknown-escape.c"
}
- },
- "end": "^\\s*(((#)\\s*endif)\\b)",
- "endCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
- },
- "2": {
- "name": "keyword.control.directive.conditional.c"
+ ]
+ },
+ "string_placeholder": {
+ "patterns": [
+ {
+ "match": "(?x) %\n(\\d+\\$)? # field (argument #)\n[#0\\- +']* # flags\n[,;:_]? # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%] # conversion type",
+ "name": "constant.other.placeholder.c"
},
- "3": {
- "name": "punctuation.definition.directive.c"
+ {
+ "match": "(%)(?!\"\\s*(PRI|SCN))",
+ "captures": {
+ "1": {
+ "name": "invalid.illegal.placeholder.c"
+ }
+ }
}
- },
+ ]
+ },
+ "storage_types": {
+ "patterns": [
+ {
+ "match": "\\b(asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\b",
+ "name": "storage.type.c"
+ }
+ ]
+ },
+ "vararg_ellipses": {
+ "match": "(?<!\\.)\\.\\.\\.(?!\\.)",
+ "name": "punctuation.vararg-ellipses.c"
+ },
+ "preprocessor-rule-conditional": {
"patterns": [
{
- "begin": "^\\s*(((#)\\s*else\\b))",
+ "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)",
"beginCaptures": {
- "1": {
+ "0": {
"name": "meta.preprocessor.c"
},
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
"2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "^\\s*((#)\\s*endif\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
- "end": "(?=^\\s*#\\s*endif\\b)",
"patterns": [
{
- "include": "#block_innards"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#preprocessor-rule-enabled-elif"
+ },
+ {
+ "include": "#preprocessor-rule-enabled-else"
+ },
+ {
+ "include": "#preprocessor-rule-disabled-elif"
+ },
+ {
+ "begin": "^\\s*((#)\\s*elif\\b)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "$base"
}
]
},
{
- "begin": "\\G",
- "end": "(?=^\\s*#\\s*(else|endif)\\b)",
- "contentName": "comment.block.preprocessor.if-branch.in-block",
+ "match": "^\\s*#\\s*(else|elif|endif)\\b",
+ "captures": {
+ "0": {
+ "name": "invalid.illegal.stray-$1.c"
+ }
+ }
+ }
+ ]
+ },
+ "preprocessor-rule-conditional-block": {
+ "patterns": [
+ {
+ "begin": "^\\s*((#)\\s*if(?:n?def)?\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "^\\s*((#)\\s*endif\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
"patterns": [
{
- "include": "#disabled"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
},
{
- "include": "#pragma-mark"
+ "include": "#preprocessor-rule-enabled-elif-block"
+ },
+ {
+ "include": "#preprocessor-rule-enabled-else-block"
+ },
+ {
+ "include": "#preprocessor-rule-disabled-elif"
+ },
+ {
+ "begin": "^\\s*((#)\\s*elif\\b)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#block_innards"
}
]
+ },
+ {
+ "match": "^\\s*#\\s*(else|elif|endif)\\b",
+ "captures": {
+ "0": {
+ "name": "invalid.illegal.stray-$1.c"
+ }
+ }
}
]
},
- "preprocessor-rule-enabled": {
- "begin": "^\\s*(((#)if)\\s+(0*1)\\b)",
- "beginCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
- },
- "2": {
+ "preprocessor-rule-conditional-line": {
+ "patterns": [
+ {
+ "match": "(?:\\bdefined\\b\\s*$)|(?:\\bdefined\\b(?=\\s*\\(*\\s*(?:(?!defined\\b)[a-zA-Z_$][\\w$]*\\b)\\s*\\)*\\s*(?:\\n|//|/\\*|\\?|\\:|&&|\\|\\||\\\\\\s*\\n)))",
"name": "keyword.control.directive.conditional.c"
},
- "3": {
- "name": "punctuation.definition.directive.c"
+ {
+ "match": "\\bdefined\\b",
+ "name": "invalid.illegal.macro-name.c"
},
- "4": {
- "name": "constant.numeric.preprocessor.c"
- }
- },
- "end": "^\\s*(((#)\\s*endif)\\b)",
- "endCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
+ {
+ "include": "#comments"
},
- "2": {
- "name": "keyword.control.directive.conditional.c"
+ {
+ "include": "#strings"
},
- "3": {
- "name": "punctuation.definition.directive.c"
+ {
+ "include": "#numbers"
+ },
+ {
+ "begin": "\\?",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.c"
+ }
+ },
+ "end": ":",
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "match": "\\b(NULL|true|false|TRUE|FALSE)\\b",
+ "name": "constant.language.c"
+ },
+ {
+ "match": "[a-zA-Z_$][\\w$]*",
+ "name": "entity.name.function.preprocessor.c"
+ },
+ {
+ "include": "#line_continuation_character"
+ },
+ {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.c"
+ }
+ },
+ "end": "\\)|(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
}
- },
+ ]
+ },
+ "preprocessor-rule-disabled": {
"patterns": [
{
- "begin": "^\\s*(((#)\\s*else)\\b).*",
+ "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
"beginCaptures": {
- "1": {
+ "0": {
"name": "meta.preprocessor.c"
},
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
"2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "^\\s*((#)\\s*endif\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
- "contentName": "comment.block.preprocessor.else-branch",
- "end": "(?=^\\s*#\\s*endif\\b)",
"patterns": [
{
- "include": "#disabled"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
},
{
- "include": "#pragma-mark"
+ "include": "#comments"
+ },
+ {
+ "include": "#preprocessor-rule-enabled-elif"
+ },
+ {
+ "include": "#preprocessor-rule-enabled-else"
+ },
+ {
+ "include": "#preprocessor-rule-disabled-elif"
+ },
+ {
+ "begin": "^\\s*((#)\\s*elif\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))",
+ "patterns": [
+ {
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.if-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
}
]
- },
+ }
+ ]
+ },
+ "preprocessor-rule-disabled-block": {
+ "patterns": [
{
- "begin": "\\G",
- "end": "(?=^\\s*#\\s*(else|endif)\\b)",
+ "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "^\\s*((#)\\s*endif\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
"patterns": [
{
- "include": "$base"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#preprocessor-rule-enabled-elif-block"
+ },
+ {
+ "include": "#preprocessor-rule-enabled-else-block"
+ },
+ {
+ "include": "#preprocessor-rule-disabled-elif"
+ },
+ {
+ "begin": "^\\s*((#)\\s*elif\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))",
+ "patterns": [
+ {
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#block_innards"
+ }
+ ]
+ },
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.if-branch.in-block.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
}
]
}
]
},
- "preprocessor-rule-enabled-block": {
- "begin": "^\\s*(((#)if)\\s+(0*1)\\b)",
+ "preprocessor-rule-disabled-elif": {
+ "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0+\\b\\)*\\s*(?:$|//|/\\*))",
"beginCaptures": {
- "1": {
+ "0": {
"name": "meta.preprocessor.c"
},
- "2": {
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
- },
- "4": {
- "name": "constant.numeric.preprocessor.c"
}
},
- "end": "^\\s*(((#)\\s*endif)\\b)",
- "endCaptures": {
- "1": {
- "name": "meta.preprocessor.c"
+ "end": "(?=^\\s*((#)\\s*(?:elif|else|endif)\\b))",
+ "patterns": [
+ {
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
},
- "2": {
- "name": "keyword.control.directive.conditional.c"
+ {
+ "include": "#comments"
},
- "3": {
- "name": "punctuation.definition.directive.c"
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.elif-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
}
- },
+ ]
+ },
+ "preprocessor-rule-enabled": {
"patterns": [
{
- "begin": "^\\s*(((#)\\s*else)\\b).*",
+ "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
"beginCaptures": {
- "1": {
+ "0": {
"name": "meta.preprocessor.c"
},
- "2": {
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ },
"3": {
+ "name": "constant.numeric.preprocessor.c"
+ }
+ },
+ "end": "^\\s*((#)\\s*endif\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
- "contentName": "comment.block.preprocessor.else-branch.in-block",
- "end": "(?=^\\s*#\\s*endif\\b)",
"patterns": [
{
- "include": "#disabled"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
},
{
- "include": "#pragma-mark"
+ "include": "#comments"
+ },
+ {
+ "begin": "^\\s*((#)\\s*else\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
+ "contentName": "comment.block.preprocessor.else-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "begin": "^\\s*((#)\\s*elif\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.if-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
}
]
- },
+ }
+ ]
+ },
+ "preprocessor-rule-enabled-block": {
+ "patterns": [
{
- "begin": "\\G",
- "end": "(?=^\\s*#\\s*(else|endif)\\b)",
+ "begin": "^\\s*((#)\\s*if\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "^\\s*((#)\\s*endif\\b)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
"patterns": [
{
- "include": "#block_innards"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "begin": "^\\s*((#)\\s*else\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
+ "contentName": "comment.block.preprocessor.else-branch.in-block.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "begin": "^\\s*((#)\\s*elif\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.if-branch.in-block.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "patterns": [
+ {
+ "include": "#block_innards"
+ }
+ ]
}
]
}
]
},
- "preprocessor-rule-other": {
- "begin": "^\\s*(((#)\\s*if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
+ "preprocessor-rule-enabled-elif": {
+ "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
"beginCaptures": {
- "1": {
+ "0": {
"name": "meta.preprocessor.c"
},
- "2": {
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
- "end": "^\\s*(((#)\\s*(endif))\\b)",
- "endCaptures": {
- "1": {
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
+ "patterns": [
+ {
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:endif)\\b))",
+ "patterns": [
+ {
+ "begin": "^\\s*((#)\\s*(else)\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
+ "contentName": "comment.block.preprocessor.elif-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "begin": "^\\s*((#)\\s*(elif)\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.elif-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ }
+ ]
+ },
+ "preprocessor-rule-enabled-elif-block": {
+ "begin": "^\\s*((#)\\s*elif\\b)(?=\\s*\\(*\\b0*1\\b\\)*\\s*(?:$|//|/\\*))",
+ "beginCaptures": {
+ "0": {
"name": "meta.preprocessor.c"
},
- "2": {
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
"patterns": [
{
- "include": "$base"
+ "begin": "\\G(?=.)",
+ "end": "(?=//)|(?=/\\*(?!.*\\\\\\s*\\n))|(?<!\\\\)(?=\\n)",
+ "name": "meta.preprocessor.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-conditional-line"
+ }
+ ]
+ },
+ {
+ "include": "#comments"
+ },
+ {
+ "begin": "\\n",
+ "end": "(?=^\\s*((#)\\s*(?:endif)\\b))",
+ "patterns": [
+ {
+ "begin": "^\\s*((#)\\s*(else)\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
+ "contentName": "comment.block.preprocessor.elif-branch.in-block.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "begin": "^\\s*((#)\\s*(elif)\\b)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.preprocessor.c"
+ },
+ "1": {
+ "name": "keyword.control.directive.conditional.c"
+ },
+ "2": {
+ "name": "punctuation.definition.directive.c"
+ }
+ },
+ "end": "(?=^\\s*((#)\\s*(?:else|elif|endif)\\b))",
+ "contentName": "comment.block.preprocessor.elif-branch.c",
+ "patterns": [
+ {
+ "include": "#disabled"
+ },
+ {
+ "include": "#pragma-mark"
+ }
+ ]
+ },
+ {
+ "include": "#block_innards"
+ }
+ ]
}
]
},
- "preprocessor-rule-other-block": {
- "begin": "^\\s*(((#)\\s*if(n?def)?)\\b.*?(?:(?=(?://|/\\*))|$))",
+ "preprocessor-rule-enabled-else": {
+ "begin": "^\\s*((#)\\s*else\\b)",
"beginCaptures": {
- "1": {
+ "0": {
"name": "meta.preprocessor.c"
},
- "2": {
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
- "end": "^\\s*(((#)\\s*endif)\\b)",
- "endCaptures": {
- "1": {
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
+ "patterns": [
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ "preprocessor-rule-enabled-else-block": {
+ "begin": "^\\s*((#)\\s*else\\b)",
+ "beginCaptures": {
+ "0": {
"name": "meta.preprocessor.c"
},
- "2": {
+ "1": {
"name": "keyword.control.directive.conditional.c"
},
- "3": {
+ "2": {
"name": "punctuation.definition.directive.c"
}
},
+ "end": "(?=^\\s*((#)\\s*endif\\b))",
"patterns": [
{
"include": "#block_innards"
}
]
},
- "operators": {
+ "preprocessor-rule-define-line-contents": {
"patterns": [
{
- "match": "(?<![\\w$])(sizeof)(?![\\w$])",
- "name": "keyword.operator.sizeof.c"
- },
- {
- "match": "--",
- "name": "keyword.operator.decrement.c"
- },
- {
- "match": "\\+\\+",
- "name": "keyword.operator.increment.c"
- },
- {
- "match": "%=|\\+=|-=|\\*=|(?<!\\()/=",
- "name": "keyword.operator.assignment.compound.c"
- },
- {
- "match": "&=|\\^=|<<=|>>=|\\|=",
- "name": "keyword.operator.assignment.compound.bitwise.c"
- },
- {
- "match": "<<|>>",
- "name": "keyword.operator.bitwise.shift.c"
- },
- {
- "match": "!=|<=|>=|==|<|>",
- "name": "keyword.operator.comparison.c"
- },
- {
- "match": "&&|!|\\|\\|",
- "name": "keyword.operator.logical.c"
- },
- {
- "match": "&|\\||\\^|~",
- "name": "keyword.operator.c"
+ "include": "#vararg_ellipses"
},
{
- "match": "=",
- "name": "keyword.operator.assignment.c"
- },
- {
- "match": "%|\\*|/|-|\\+",
- "name": "keyword.operator.c"
- },
- {
- "begin": "\\?",
+ "begin": "{",
"beginCaptures": {
"0": {
- "name": "keyword.operator.ternary.c"
+ "name": "punctuation.section.block.begin.bracket.curly.c"
}
},
- "end": ":",
+ "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)",
"endCaptures": {
"0": {
- "name": "keyword.operator.ternary.c"
+ "name": "punctuation.section.block.end.bracket.curly.c"
}
},
+ "name": "meta.block.c",
"patterns": [
{
- "include": "$self"
+ "include": "#preprocessor-rule-define-line-blocks"
}
]
- }
- ]
- },
- "strings": {
- "patterns": [
+ },
+ {
+ "match": "\\(",
+ "name": "punctuation.section.parens.begin.bracket.round.c"
+ },
+ {
+ "match": "\\)",
+ "name": "punctuation.section.parens.end.bracket.round.c"
+ },
+ {
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate|asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void)\\s*\\()\n(?=\n (?:[A-Za-z_][A-Za-z0-9_]*+|::)++\\s*\\( # actual name\n |\n (?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\\s*\\(\n)",
+ "end": "(?<=\\))(?!\\w)|(?<!\\\\)(?=\\s*\\n)",
+ "name": "meta.function.c",
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-define-line-functions"
+ }
+ ]
+ },
{
"begin": "\"",
"beginCaptures": {
@@ -907,7 +1690,7 @@
"name": "punctuation.definition.string.begin.c"
}
},
- "end": "\"",
+ "end": "\"|(?<!\\\\)(?=\\s*\\n)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.c"
@@ -933,7 +1716,7 @@
"name": "punctuation.definition.string.begin.c"
}
},
- "end": "'",
+ "end": "'|(?<!\\\\)(?=\\s*\\n)",
"endCaptures": {
"0": {
"name": "punctuation.definition.string.end.c"
@@ -948,33 +1731,229 @@
"include": "#line_continuation_character"
}
]
+ },
+ {
+ "include": "#access"
+ },
+ {
+ "include": "#libc"
+ },
+ {
+ "include": "$base"
}
]
},
- "string_escaped_char": {
+ "preprocessor-rule-define-line-blocks": {
"patterns": [
{
- "match": "(?x)\\\\ (\n\\\\ |\n[abefnprtv'\"?] |\n[0-3]\\d{,2} |\n[4-7]\\d? |\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )",
- "name": "constant.character.escape.c"
+ "begin": "{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.block.begin.bracket.curly.c"
+ }
+ },
+ "end": "}|(?=\\s*#\\s*(?:elif|else|endif)\\b)|(?<!\\\\)(?=\\s*\\n)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.block.end.bracket.curly.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-define-line-blocks"
+ },
+ {
+ "include": "#preprocessor-rule-define-line-contents"
+ }
+ ]
},
{
- "match": "\\\\.",
- "name": "invalid.illegal.unknown-escape.c"
+ "include": "#preprocessor-rule-define-line-contents"
}
]
},
- "string_placeholder": {
+ "preprocessor-rule-define-line-functions": {
"patterns": [
{
- "match": "(?x) %\n(\\d+\\$)? # field (argument #)\n[#0\\- +']* # flags\n[,;:_]? # separator character (AltiVec)\n((-?\\d+)|\\*(-?\\d+\\$)?)? # minimum field width\n(\\.((-?\\d+)|\\*(-?\\d+\\$)?)?)? # precision\n(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)? # length modifier\n[diouxXDOUeEfFgGaACcSspn%] # conversion type",
- "name": "constant.other.placeholder.c"
+ "include": "#comments"
+ },
+ {
+ "include": "#storage_types"
+ },
+ {
+ "include": "#vararg_ellipses"
+ },
+ {
+ "include": "#access"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.function.c"
+ },
+ "2": {
+ "name": "punctuation.section.arguments.begin.bracket.round.c"
+ }
+ },
+ "end": "(\\))|(?<!\\\\)(?=\\s*\\n)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.arguments.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-define-line-functions"
+ }
+ ]
+ },
+ {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.c"
+ }
+ },
+ "end": "(\\))|(?<!\\\\)(?=\\s*\\n)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.section.parens.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#preprocessor-rule-define-line-functions"
+ }
+ ]
+ },
+ {
+ "include": "#preprocessor-rule-define-line-contents"
+ }
+ ]
+ },
+ "function-innards": {
+ "patterns": [
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#storage_types"
},
{
- "match": "%",
- "name": "invalid.illegal.placeholder.c"
+ "include": "#operators"
+ },
+ {
+ "include": "#vararg_ellipses"
+ },
+ {
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.function.c"
+ },
+ "2": {
+ "name": "punctuation.section.parameters.begin.bracket.round.c"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parameters.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-innards"
+ }
+ ]
+ },
+ {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.c"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-innards"
+ }
+ ]
+ },
+ {
+ "include": "$base"
+ }
+ ]
+ },
+ "function-call-innards": {
+ "patterns": [
+ {
+ "include": "#comments"
+ },
+ {
+ "include": "#storage_types"
+ },
+ {
+ "include": "#access"
+ },
+ {
+ "include": "#operators"
+ },
+ {
+ "begin": "(?x)\n(?!(?:while|for|do|if|else|switch|catch|enumerate|return|sizeof|[cr]?iterate)\\s*\\()\n(\n(?:[A-Za-z_][A-Za-z0-9_]*+|::)++ # actual name\n|\n(?:(?<=operator)(?:[-*&<>=+!]+|\\(\\)|\\[\\]))\n)\n\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "entity.name.function.c"
+ },
+ "2": {
+ "name": "punctuation.section.arguments.begin.bracket.round.c"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.arguments.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-call-innards"
+ }
+ ]
+ },
+ {
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.begin.bracket.round.c"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.parens.end.bracket.round.c"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#function-call-innards"
+ }
+ ]
+ },
+ {
+ "include": "#block_innards"
}
]
}
- },
- "version": "https://github.com/atom/language-c/commit/2a5fafe1d86f690b5ab2c877cea2fc6a598e001a"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/OSSREADME.json
index c9b5c13ba5..a5bb212fc7 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/OSSREADME.json
@@ -1,22 +1,9 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
- "name": "textmate/css.tmbundle",
- "license": "TextMate Bundle License",
- "repositoryURL": "https://github.com/textmate/css.tmbundle",
- "repositoryRevision": "d79e9c0",
- "licenseDetail": [
- "Copyright (c) textmate-css.tmbundle project authors",
- "",
- "If not otherwise specified (see below), files in this folder fall under the following license: ",
- "",
- "Permission to copy, use, modify, sell and distribute this",
- "software is granted. This software is provided \"as is\" without",
- "express or implied warranty, and with no claim as to its",
- "suitability for any purpose.",
- "",
- "An exception is made for files in readable text which contain their own license information, ",
- "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added ",
- "to the base-name name of the original file, and an extension of txt, html, or similar. For example ",
- "\"tidy\" is accompanied by \"tidy-license.txt\"."
- ]
+ "name": "atom/language-css",
+ "version": "0.0.0",
+ "license": "MIT",
+ "repositoryURL": "https://github.com/atom/language-css",
+ "description": "The file syntaxes/css.tmLanguage.json was derived from the Atom package https://github.com/atom/language-css which was originally converted from the TextMate bundle https://github.com/textmate/css.tmbundle."
+
}]
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/npm-shrinkwrap.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/npm-shrinkwrap.json
index 0b55dcb027..eece4499ec 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/npm-shrinkwrap.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/npm-shrinkwrap.json
@@ -3,24 +3,24 @@
"version": "0.1.0",
"dependencies": {
"vscode-jsonrpc": {
- "version": "2.3.2-next.5",
- "from": "vscode-jsonrpc@>=2.3.2-next.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.3.2-next.5.tgz"
+ "version": "3.2.0",
+ "from": "vscode-jsonrpc@>=3.2.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.2.0.tgz"
},
"vscode-languageclient": {
- "version": "2.4.2-next.22",
- "from": "vscode-languageclient@next",
- "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.4.2-next.22.tgz"
+ "version": "3.2.0",
+ "from": "vscode-languageclient@3.2.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.2.0.tgz"
},
"vscode-languageserver-types": {
- "version": "1.0.3",
- "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
+ "version": "3.2.0",
+ "from": "vscode-languageserver-types@>=3.2.0 <4.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.2.0.tgz"
},
"vscode-nls": {
- "version": "1.0.7",
- "from": "vscode-nls@latest",
- "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz"
+ "version": "2.0.2",
+ "from": "vscode-nls@2.0.2",
+ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz"
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/package.json
index a58f5f3387..88da0e07ff 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/css/package.json
@@ -16,7 +16,8 @@
"compile": "gulp compile-extension:css-client && gulp compile-extension:css-server",
"postinstall": "cd server && npm install",
"install-client-next": "npm install vscode-languageclient@next -f -S",
- "install-client-local": "npm install ../../../vscode-languageserver-node/client -f -S"
+ "install-client-local": "npm install ../../../vscode-languageserver-node/client -f -S",
+ "update-grammar": "node ../../build/npm/update-grammar.js atom/language-css grammars/css.cson ./syntaxes/css.tmLanguage.json"
},
"contributes": {
"languages": [
@@ -39,7 +40,7 @@
{
"language": "css",
"scopeName": "source.css",
- "path": "./syntaxes/css.plist"
+ "path": "./syntaxes/css.tmLanguage.json"
}
],
"snippets": [
@@ -61,7 +62,12 @@
"css.validate": {
"type": "boolean",
"default": true,
- "description": "Enables or disables all validations"
+ "description": "%css.validate.desc%"
+ },
+ "css.colorDecorators.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%css.colorDecorators.enable.desc%"
},
"css.lint.compatibleVendorPrefixes": {
"type": "string",
@@ -71,7 +77,7 @@
"error"
],
"default": "ignore",
- "description": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"
+ "description": "%css.lint.compatibleVendorPrefixes.desc%"
},
"css.lint.vendorPrefix": {
"type": "string",
@@ -81,7 +87,7 @@
"error"
],
"default": "warning",
- "description": "When using a vendor-specific prefix also include the standard property"
+ "description": "%css.lint.vendorPrefix.desc%"
},
"css.lint.duplicateProperties": {
"type": "string",
@@ -91,7 +97,7 @@
"error"
],
"default": "ignore",
- "description": "Do not use duplicate style definitions"
+ "description": "%css.lint.duplicateProperties.desc%"
},
"css.lint.emptyRules": {
"type": "string",
@@ -101,7 +107,7 @@
"error"
],
"default": "warning",
- "description": "Do not use empty rulesets"
+ "description": "%css.lint.emptyRules.desc%"
},
"css.lint.importStatement": {
"type": "string",
@@ -111,7 +117,7 @@
"error"
],
"default": "ignore",
- "description": "Import statements do not load in parallel"
+ "description": "%css.lint.importStatement.desc%"
},
"css.lint.boxModel": {
"type": "string",
@@ -121,7 +127,7 @@
"error"
],
"default": "ignore",
- "description": "Do not use width or height when using padding or border"
+ "description": "%css.lint.boxModel.desc%"
},
"css.lint.universalSelector": {
"type": "string",
@@ -131,7 +137,7 @@
"error"
],
"default": "ignore",
- "description": "The universal selector (*) is known to be slow"
+ "description": "%css.lint.universalSelector.desc%"
},
"css.lint.zeroUnits": {
"type": "string",
@@ -141,7 +147,7 @@
"error"
],
"default": "ignore",
- "description": "No unit for zero needed"
+ "description": "%css.lint.zeroUnits.desc%"
},
"css.lint.fontFaceProperties": {
"type": "string",
@@ -151,7 +157,7 @@
"error"
],
"default": "warning",
- "description": "@font-face rule must define 'src' and 'font-family' properties"
+ "description": "%css.lint.fontFaceProperties.desc%"
},
"css.lint.hexColorLength": {
"type": "string",
@@ -161,7 +167,7 @@
"error"
],
"default": "error",
- "description": "Hex colors must consist of three or six hex numbers"
+ "description": "%css.lint.hexColorLength.desc%"
},
"css.lint.argumentsInColorFunction": {
"type": "string",
@@ -171,7 +177,7 @@
"error"
],
"default": "error",
- "description": "Invalid number of parameters"
+ "description": "%css.lint.argumentsInColorFunction.desc%"
},
"css.lint.unknownProperties": {
"type": "string",
@@ -181,7 +187,7 @@
"error"
],
"default": "warning",
- "description": "Unknown property."
+ "description": "%css.lint.unknownProperties.desc%"
},
"css.lint.ieHack": {
"type": "string",
@@ -191,7 +197,7 @@
"error"
],
"default": "ignore",
- "description": "IE hacks are only necessary when supporting IE7 and older"
+ "description": "%css.lint.ieHack.desc%"
},
"css.lint.unknownVendorSpecificProperties": {
"type": "string",
@@ -201,7 +207,7 @@
"error"
],
"default": "ignore",
- "description": "Unknown vendor specific property."
+ "description": "%css.lint.unknownVendorSpecificProperties.desc%"
},
"css.lint.propertyIgnoredDueToDisplay": {
"type": "string",
@@ -211,7 +217,7 @@
"error"
],
"default": "warning",
- "description": "Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect"
+ "description": "%css.lint.propertyIgnoredDueToDisplay.desc%"
},
"css.lint.important": {
"type": "string",
@@ -221,7 +227,7 @@
"error"
],
"default": "ignore",
- "description": "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."
+ "description": "%css.lint.important.desc%"
},
"css.lint.float": {
"type": "string",
@@ -231,7 +237,7 @@
"error"
],
"default": "ignore",
- "description": "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."
+ "description": "%css.lint.float.desc%"
},
"css.lint.idSelector": {
"type": "string",
@@ -241,7 +247,17 @@
"error"
],
"default": "ignore",
- "description": "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."
+ "description": "%css.lint.idSelector.desc%"
+ },
+ "css.trace.server": {
+ "type": "string",
+ "enum": [
+ "off",
+ "messages",
+ "verbose"
+ ],
+ "default": "off",
+ "description": "Traces the communication between VS Code and the CSS language server."
}
}
}
@@ -258,7 +274,12 @@
"scss.validate": {
"type": "boolean",
"default": true,
- "description": "Enables or disables all validations"
+ "description": "%scss.validate.desc%"
+ },
+ "scss.colorDecorators.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%scss.colorDecorators.enable.desc%"
},
"scss.lint.compatibleVendorPrefixes": {
"type": "string",
@@ -268,7 +289,7 @@
"error"
],
"default": "ignore",
- "description": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"
+ "description": "%scss.lint.compatibleVendorPrefixes.desc%"
},
"scss.lint.vendorPrefix": {
"type": "string",
@@ -278,7 +299,7 @@
"error"
],
"default": "warning",
- "description": "When using a vendor-specific prefix also include the standard property"
+ "description": "%scss.lint.vendorPrefix.desc%"
},
"scss.lint.duplicateProperties": {
"type": "string",
@@ -288,7 +309,7 @@
"error"
],
"default": "ignore",
- "description": "Do not use duplicate style definitions"
+ "description": "%scss.lint.duplicateProperties.desc%"
},
"scss.lint.emptyRules": {
"type": "string",
@@ -298,7 +319,7 @@
"error"
],
"default": "warning",
- "description": "Do not use empty rulesets"
+ "description": "%scss.lint.emptyRules.desc%"
},
"scss.lint.importStatement": {
"type": "string",
@@ -308,7 +329,7 @@
"error"
],
"default": "ignore",
- "description": "Import statements do not load in parallel"
+ "description": "%scss.lint.importStatement.desc%"
},
"scss.lint.boxModel": {
"type": "string",
@@ -318,7 +339,7 @@
"error"
],
"default": "ignore",
- "description": "Do not use width or height when using padding or border"
+ "description": "%scss.lint.boxModel.desc%"
},
"scss.lint.universalSelector": {
"type": "string",
@@ -328,7 +349,7 @@
"error"
],
"default": "ignore",
- "description": "The universal selector (*) is known to be slow"
+ "description": "%scss.lint.universalSelector.desc%"
},
"scss.lint.zeroUnits": {
"type": "string",
@@ -338,7 +359,7 @@
"error"
],
"default": "ignore",
- "description": "No unit for zero needed"
+ "description": "%scss.lint.zeroUnits.desc%"
},
"scss.lint.fontFaceProperties": {
"type": "string",
@@ -348,7 +369,7 @@
"error"
],
"default": "warning",
- "description": "@font-face rule must define 'src' and 'font-family' properties"
+ "description": "%scss.lint.fontFaceProperties.desc%"
},
"scss.lint.hexColorLength": {
"type": "string",
@@ -358,7 +379,7 @@
"error"
],
"default": "error",
- "description": "Hex colors must consist of three or six hex numbers"
+ "description": "%scss.lint.hexColorLength.desc%"
},
"scss.lint.argumentsInColorFunction": {
"type": "string",
@@ -368,7 +389,7 @@
"error"
],
"default": "error",
- "description": "Invalid number of parameters"
+ "description": "%scss.lint.argumentsInColorFunction.desc%"
},
"scss.lint.unknownProperties": {
"type": "string",
@@ -378,7 +399,7 @@
"error"
],
"default": "warning",
- "description": "Unknown property."
+ "description": "%scss.lint.unknownProperties.desc%"
},
"scss.lint.ieHack": {
"type": "string",
@@ -388,7 +409,7 @@
"error"
],
"default": "ignore",
- "description": "IE hacks are only necessary when supporting IE7 and older"
+ "description": "%scss.lint.ieHack.desc%"
},
"scss.lint.unknownVendorSpecificProperties": {
"type": "string",
@@ -398,7 +419,7 @@
"error"
],
"default": "ignore",
- "description": "Unknown vendor specific property."
+ "description": "%scss.lint.unknownVendorSpecificProperties.desc%"
},
"scss.lint.propertyIgnoredDueToDisplay": {
"type": "string",
@@ -408,7 +429,7 @@
"error"
],
"default": "warning",
- "description": "Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect"
+ "description": "%scss.lint.propertyIgnoredDueToDisplay.desc%"
},
"scss.lint.important": {
"type": "string",
@@ -418,7 +439,7 @@
"error"
],
"default": "ignore",
- "description": "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."
+ "description": "%scss.lint.important.desc%"
},
"scss.lint.float": {
"type": "string",
@@ -428,7 +449,7 @@
"error"
],
"default": "ignore",
- "description": "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."
+ "description": "%scss.lint.float.desc%"
},
"scss.lint.idSelector": {
"type": "string",
@@ -438,7 +459,7 @@
"error"
],
"default": "ignore",
- "description": "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."
+ "description": "%scss.lint.idSelector.desc%"
}
}
}
@@ -456,7 +477,12 @@
"less.validate": {
"type": "boolean",
"default": true,
- "description": "Enables or disables all validations"
+ "description": "%less.validate.desc%"
+ },
+ "less.colorDecorators.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%less.colorDecorators.enable.desc%"
},
"less.lint.compatibleVendorPrefixes": {
"type": "string",
@@ -466,7 +492,7 @@
"error"
],
"default": "ignore",
- "description": "When using a vendor-specific prefix make sure to also include all other vendor-specific properties"
+ "description": "%less.lint.compatibleVendorPrefixes.desc%"
},
"less.lint.vendorPrefix": {
"type": "string",
@@ -476,7 +502,7 @@
"error"
],
"default": "warning",
- "description": "When using a vendor-specific prefix also include the standard property"
+ "description": "%less.lint.vendorPrefix.desc%"
},
"less.lint.duplicateProperties": {
"type": "string",
@@ -486,7 +512,7 @@
"error"
],
"default": "ignore",
- "description": "Do not use duplicate style definitions"
+ "description": "%less.lint.duplicateProperties.desc%"
},
"less.lint.emptyRules": {
"type": "string",
@@ -496,7 +522,7 @@
"error"
],
"default": "warning",
- "description": "Do not use empty rulesets"
+ "description": "%less.lint.emptyRules.desc%"
},
"less.lint.importStatement": {
"type": "string",
@@ -506,7 +532,7 @@
"error"
],
"default": "ignore",
- "description": "Import statements do not load in parallel"
+ "description": "%less.lint.importStatement.desc%"
},
"less.lint.boxModel": {
"type": "string",
@@ -516,7 +542,7 @@
"error"
],
"default": "ignore",
- "description": "Do not use width or height when using padding or border"
+ "description": "%less.lint.boxModel.desc%"
},
"less.lint.universalSelector": {
"type": "string",
@@ -526,7 +552,7 @@
"error"
],
"default": "ignore",
- "description": "The universal selector (*) is known to be slow"
+ "description": "%less.lint.universalSelector.desc%"
},
"less.lint.zeroUnits": {
"type": "string",
@@ -536,7 +562,7 @@
"error"
],
"default": "ignore",
- "description": "No unit for zero needed"
+ "description": "%less.lint.zeroUnits.desc%"
},
"less.lint.fontFaceProperties": {
"type": "string",
@@ -546,7 +572,7 @@
"error"
],
"default": "warning",
- "description": "@font-face rule must define 'src' and 'font-family' properties"
+ "description": "%less.lint.fontFaceProperties.desc%"
},
"less.lint.hexColorLength": {
"type": "string",
@@ -556,7 +582,7 @@
"error"
],
"default": "error",
- "description": "Hex colors must consist of three or six hex numbers"
+ "description": "%less.lint.hexColorLength.desc%"
},
"less.lint.argumentsInColorFunction": {
"type": "string",
@@ -566,7 +592,7 @@
"error"
],
"default": "error",
- "description": "Invalid number of parameters"
+ "description": "%less.lint.argumentsInColorFunction.desc%"
},
"less.lint.unknownProperties": {
"type": "string",
@@ -576,7 +602,7 @@
"error"
],
"default": "warning",
- "description": "Unknown property."
+ "description": "%less.lint.unknownProperties.desc%"
},
"less.lint.ieHack": {
"type": "string",
@@ -586,7 +612,7 @@
"error"
],
"default": "ignore",
- "description": "IE hacks are only necessary when supporting IE7 and older"
+ "description": "%less.lint.ieHack.desc%"
},
"less.lint.unknownVendorSpecificProperties": {
"type": "string",
@@ -596,7 +622,7 @@
"error"
],
"default": "ignore",
- "description": "Unknown vendor specific property."
+ "description": "%less.lint.unknownVendorSpecificProperties.desc%"
},
"less.lint.propertyIgnoredDueToDisplay": {
"type": "string",
@@ -606,7 +632,7 @@
"error"
],
"default": "warning",
- "description": "Property is ignored due to the display. E.g. with 'display: inline', the width, height, margin-top, margin-bottom, and float properties have no effect"
+ "description": "%less.lint.propertyIgnoredDueToDisplay.desc%"
},
"less.lint.important": {
"type": "string",
@@ -616,7 +642,7 @@
"error"
],
"default": "ignore",
- "description": "Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."
+ "description": "%less.lint.important.desc%"
},
"less.lint.float": {
"type": "string",
@@ -626,7 +652,7 @@
"error"
],
"default": "ignore",
- "description": "Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."
+ "description": "%less.lint.float.desc%"
},
"less.lint.idSelector": {
"type": "string",
@@ -636,7 +662,7 @@
"error"
],
"default": "ignore",
- "description": "Selectors should not contain IDs because these rules are too tightly coupled with the HTML."
+ "description": "%less.lint.idSelector.desc%"
}
}
}
@@ -646,7 +672,10 @@
}
},
"dependencies": {
- "vscode-languageclient": "^2.4.2-next.22",
- "vscode-nls": "^1.0.7"
+ "vscode-languageclient": "^3.2.0",
+ "vscode-nls": "^2.0.2"
+ },
+ "devDependencies": {
+ "@types/node": "^6.0.51"
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/OSSREADME.json
index 9209fee9f6..3be6fb8138 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/OSSREADME.json
@@ -1,9 +1,9 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
"name": "textmate/diff.tmbundle",
+ "version": "0.0.0",
"license": "TextMate Bundle License",
"repositoryURL": "https://github.com/textmate/diff.tmbundle",
- "repositoryRevision": "372abaa",
"licenseDetail": [
"Copyright (c) textmate-diff.tmbundle project authors",
"",
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/package.json
index 64a1df166c..a62e57243c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/diff/package.json
@@ -3,12 +3,15 @@
"version": "0.1.0",
"publisher": "vscode",
"engines": { "vscode": "*" },
+ "scripts": {
+ "update-grammar": "node ../../build/npm/update-grammar.js textmate/diff.tmbundle Syntaxes/Diff.plist ./syntaxes/diff.tmLanguage.json"
+ },
"contributes": {
"languages": [
{
"id": "diff",
"aliases": ["Diff", "diff" ],
- "extensions": [".patch", ".diff", ".rej"],
+ "extensions": [".diff", ".patch", ".rej"],
"configuration": "./language-configuration.json"
}
],
@@ -16,7 +19,7 @@
{
"language": "diff",
"scopeName": "source.diff",
- "path": "./syntaxes/diff.tmLanguage"
+ "path": "./syntaxes/diff.tmLanguage.json"
}
]
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/OSSREADME.json
index 7c18252d5b..473df53afb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/OSSREADME.json
@@ -1,9 +1,14 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
+ "name": "js-beautify",
+ "version": "1.6.8",
+ "license": "MIT",
+ "repositoryURL": "https://github.com/beautify-web/js-beautify"
+},{
"name": "textmate/html.tmbundle",
+ "version": "0.0.0",
"license": "TextMate Bundle License",
"repositoryURL": "https://github.com/textmate/html.tmbundle",
- "repositoryRevision": "d1231e3",
"licenseDetail": [
"Copyright (c) textmate-html.tmbundle project authors",
"",
@@ -19,4 +24,92 @@
"to the base-name name of the original file, and an extension of txt, html, or similar. For example",
"\"tidy\" is accompanied by \"tidy-license.txt\"."
]
-}]
+},
+{
+ "name": "HTML 5.1 W3C Working Draft",
+ "version": "08 October 2015",
+ "license": "W3C Document License",
+ "repositoryURL": "http://www.w3.org/TR/2015/WD-html51-20151008/",
+ "licenseDetail": [
+ "Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied ",
+ "from or derived from HTML 5.1 W3C Working Draft (http://www.w3.org/TR/2015/WD-html51-20151008/.)",
+ "",
+ "THIS DOCUMENT IS PROVIDED \"AS IS,\" AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT ",
+ "NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF ",
+ "THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY ",
+ "PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.",
+ "",
+ "COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE ",
+ "DOCUMENT OR THE PERFORMANCE OR IMPLEMENTATION OF THE CONTENTS THEREOF.",
+ "",
+ "The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to this document or its contents",
+ "without specific, written prior permission. Title to copyright in this document will at all times remain with copyright holders."
+ ]
+},
+{
+ "name": "Ionic documentation",
+ "version": "1.2.4",
+ "license": "Apache2",
+ "repositoryURL": "https://github.com/ionic-team/ionic-site",
+ "licenseDetail": [
+ "Copyright Drifty Co. http://drifty.com/.",
+ "",
+ "Apache License",
+ "",
+ "Version 2.0, January 2004",
+ "",
+ "http://www.apache.org/licenses/",
+ "",
+ "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION",
+ "",
+ "1. Definitions.",
+ "",
+ "\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.",
+ "",
+ "\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.",
+ "",
+ "\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.",
+ "",
+ "\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.",
+ "",
+ "\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.",
+ "",
+ "\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.",
+ "",
+ "\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).",
+ "",
+ "\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.",
+ "",
+ "\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"",
+ "",
+ "\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.",
+ "",
+ "2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.",
+ "",
+ "3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.",
+ "",
+ "4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:",
+ "",
+ "You must give any other recipients of the Work or Derivative Works a copy of this License; and",
+ "",
+ "You must cause any modified files to carry prominent notices stating that You changed the files; and",
+ "",
+ "You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and",
+ "",
+ "If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.",
+ "",
+ "5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.",
+ "",
+ "6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.",
+ "",
+ "7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.",
+ "",
+ "8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.",
+ "",
+ "9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.",
+ "",
+ "END OF TERMS AND CONDITIONS"
+ ]
+}
+
+]
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/language-configuration.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/language-configuration.json
index 3c8204c218..51bae7c408 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/language-configuration.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/language-configuration.json
@@ -4,18 +4,23 @@
},
"brackets": [
["<!--", "-->"],
- ["<", ">"]
+ ["<", ">"],
+ ["{", "}"],
+ ["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}"},
{ "open": "[", "close": "]"},
{ "open": "(", "close": ")" },
{ "open": "'", "close": "'" },
- { "open": "\"", "close": "\"" },
- { "open": "<", "close": ">" }
+ { "open": "\"", "close": "\"" }
],
"surroundingPairs": [
{ "open": "'", "close": "'" },
- { "open": "\"", "close": "\"" }
+ { "open": "\"", "close": "\"" },
+ { "open": "{", "close": "}"},
+ { "open": "[", "close": "]"},
+ { "open": "(", "close": ")" },
+ { "open": "<", "close": ">" }
]
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/npm-shrinkwrap.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/npm-shrinkwrap.json
index 8c75973873..fe73237002 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/npm-shrinkwrap.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/npm-shrinkwrap.json
@@ -2,25 +2,40 @@
"name": "html",
"version": "0.1.0",
"dependencies": {
+ "applicationinsights": {
+ "version": "0.18.0",
+ "from": "applicationinsights@0.18.0",
+ "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz"
+ },
+ "vscode-extension-telemetry": {
+ "version": "0.0.6",
+ "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7",
+ "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz"
+ },
"vscode-jsonrpc": {
- "version": "2.4.0",
- "from": "vscode-jsonrpc@>=2.4.0 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.4.0.tgz"
+ "version": "3.1.0-alpha.1",
+ "from": "vscode-jsonrpc@>=3.1.0-alpha.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.1.0-alpha.1.tgz"
},
"vscode-languageclient": {
- "version": "2.6.0-next.1",
- "from": "vscode-languageclient@>=2.6.0-next.1 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.6.0-next.1.tgz"
+ "version": "3.1.0-alpha.1",
+ "from": "vscode-languageclient@next",
+ "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.1.0-alpha.1.tgz"
},
"vscode-languageserver-types": {
- "version": "1.0.4-next.2",
- "from": "vscode-languageserver-types@>=1.0.4-next.2 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.4-next.2.tgz"
+ "version": "3.0.3",
+ "from": "vscode-languageserver-types@>=3.0.2-beta.5 <4.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.0.3.tgz"
},
"vscode-nls": {
- "version": "1.0.7",
- "from": "vscode-nls@>=1.0.7 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz"
+ "version": "2.0.2",
+ "from": "vscode-nls@>=2.0.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz"
+ },
+ "winreg": {
+ "version": "1.2.3",
+ "from": "winreg@1.2.3",
+ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz"
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/package.json
index 468878ad63..c8525093d0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/package.json
@@ -2,6 +2,7 @@
"name": "html",
"version": "0.1.0",
"publisher": "vscode",
+ "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
"engines": {
"vscode": "0.10.x"
},
@@ -15,50 +16,98 @@
"compile": "gulp compile-extension:html-client && gulp compile-extension:html-server",
"postinstall": "cd server && npm install",
"update-grammar": "node ../../build/npm/update-grammar.js textmate/html.tmbundle Syntaxes/HTML.plist ./syntaxes/html.json",
- "install-client-next": "npm install vscode-languageclient@next -f -S",
- "install-client-local": "npm install ../../../vscode-languageserver-node/client -f -S"
+ "install-client-next": "npm install vscode-languageserver-types@next -f -S && npm install vscode-languageclient@next -f -S",
+ "install-client-local": "npm install ../../../vscode-languageserver-node/types -f -S && npm install ../../../vscode-languageserver-node/client -f -S"
},
- "contributes": {
- "languages": [{
- "id": "html",
- "extensions": [ ".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm", ".vue" ],
- "aliases": [ "HTML", "htm", "html", "xhtml" ],
- "mimetypes": ["text/html", "text/x-jshtm", "text/template", "text/ng-template", "application/xhtml+xml"],
- "configuration": "./language-configuration.json"
- }],
- "grammars": [{
- "language": "html",
- "scopeName": "text.html.basic",
- "path": "./syntaxes/html.json"
- }],
+ "contributes": {
+ "languages": [
+ {
+ "id": "html",
+ "extensions": [
+ ".rhtml",
+ ".html",
+ ".htm",
+ ".shtml",
+ ".xhtml",
+ ".mdoc",
+ ".jsp",
+ ".asp",
+ ".aspx",
+ ".jshtm",
+ ".volt",
+ ".ejs"
+ ],
+ "aliases": [
+ "HTML",
+ "htm",
+ "html",
+ "xhtml"
+ ],
+ "mimetypes": [
+ "text/html",
+ "text/x-jshtm",
+ "text/template",
+ "text/ng-template",
+ "application/xhtml+xml"
+ ],
+ "configuration": "./language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "html",
+ "scopeName": "text.html.basic",
+ "path": "./syntaxes/html.json",
+ "embeddedLanguages": {
+ "text.html": "html",
+ "source.css": "css",
+ "source.js": "javascript",
+ "source.python": "python",
+ "source.smarty": "smarty"
+ }
+ }
+ ],
"configuration": {
"id": "html",
"order": 20,
"type": "object",
"title": "HTML",
"properties": {
+ "html.format.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%html.format.enable.desc%"
+ },
"html.format.wrapLineLength": {
"type": "integer",
"default": 120,
- "description": "Maximum amount of characters per line (0 = disable)."
+ "description": "%html.format.wrapLineLength.desc%"
},
"html.format.unformatted": {
"type": [
"string",
"null"
],
- "default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, script, select, small, span, strong, sub, sup, textarea, tt, var",
- "description": "List of tags, comma separated, that shouldn't be reformatted. 'null' defaults to all tags listed at https://www.w3.org/TR/html5/dom.html#phrasing-content."
+ "default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var",
+ "description": "%html.format.unformatted.desc%"
+ },
+ "html.format.contentUnformatted": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "default": "pre",
+ "description": "%html.format.contentUnformatted.desc%"
},
"html.format.indentInnerHtml": {
"type": "boolean",
"default": false,
- "description": "Indent <head> and <body> sections."
+ "description": "%html.format.indentInnerHtml.desc%"
},
"html.format.preserveNewLines": {
"type": "boolean",
"default": true,
- "description": "Whether existing line breaks before elements should be preserved. Only works before elements, not inside tags or for text."
+ "description": "%html.format.preserveNewLines.desc%"
},
"html.format.maxPreserveNewLines": {
"type": [
@@ -66,17 +115,17 @@
"null"
],
"default": null,
- "description": "Maximum number of line breaks to be preserved in one chunk. Use 'null' for unlimited."
+ "description": "%html.format.maxPreserveNewLines.desc%"
},
"html.format.indentHandlebars": {
"type": "boolean",
"default": false,
- "description": "Format and indent {{#foo}} and {{/foo}}."
+ "description": "%html.format.indentHandlebars.desc%"
},
"html.format.endWithNewline": {
"type": "boolean",
"default": false,
- "description": "End with a newline."
+ "description": "%html.format.endWithNewline.desc%"
},
"html.format.extraLiners": {
"type": [
@@ -84,28 +133,71 @@
"null"
],
"default": "head, body, /html",
- "description": "List of tags, comma separated, that should have an extra newline before them. 'null' defaults to \"head, body, /html\"."
+ "description": "%html.format.extraLiners.desc%"
+ },
+ "html.format.wrapAttributes": {
+ "type": "string",
+ "default": "auto",
+ "enum": [
+ "auto",
+ "force",
+ "force-aligned",
+ "force-expand-multiline"
+ ],
+ "enumDescriptions": [
+ "%html.format.wrapAttributes.auto%",
+ "%html.format.wrapAttributes.force%",
+ "%html.format.wrapAttributes.forcealign%",
+ "%html.format.wrapAttributes.forcemultiline%"
+ ],
+ "description": "%html.format.wrapAttributes.desc%"
},
"html.suggest.angular1": {
"type": "boolean",
"default": true,
- "description": "Configures if the built-in HTML language support suggests Angular V1 tags and properties."
+ "description": "%html.suggest.angular1.desc%"
},
"html.suggest.ionic": {
"type": "boolean",
"default": true,
- "description": "Configures if the built-in HTML language support suggests Ionic tags, properties and values."
+ "description": "%html.suggest.ionic.desc%"
},
"html.suggest.html5": {
"type": "boolean",
"default": true,
- "description": "Configures if the built-in HTML language support suggests HTML5 tags, properties and values."
+ "description": "%html.suggest.html5.desc%"
+ },
+ "html.validate.scripts": {
+ "type": "boolean",
+ "default": true,
+ "description": "%html.validate.scripts%"
+ },
+ "html.validate.styles": {
+ "type": "boolean",
+ "default": true,
+ "description": "%html.validate.styles%"
+ },
+ "html.trace.server": {
+ "type": "string",
+ "enum": [
+ "off",
+ "messages",
+ "verbose"
+ ],
+ "default": "off",
+ "description": "Traces the communication between VS Code and the HTML language server."
}
}
}
},
"dependencies": {
- "vscode-languageclient": "^2.6.0-next.1",
- "vscode-nls": "^1.0.7"
+ "vscode-extension-telemetry": "^0.0.7",
+ "vscode-languageclient": "^3.1.0-alpha.1",
+ "vscode-languageserver-types": "^3.0.3",
+ "vscode-nls": "^2.0.2"
+ },
+ "devDependencies": {
+ "@types/node": "^6.0.51",
+ "@types/mocha": "^2.2.33"
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/syntaxes/html.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/syntaxes/html.json
index 0dbf729749..4192c82470 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/syntaxes/html.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/html/syntaxes/html.json
@@ -1,4 +1,9 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/textmate/html.tmbundle/blob/master/Syntaxes/HTML.plist",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"fileTypes": [
"html",
"htm",
@@ -10,7 +15,7 @@
],
"firstLineMatch": "<(?i:(!DOCTYPE\\s*)?html)",
"injections": {
- "R:text.html - comment.block": {
+ "R:text.html - (comment.block, text.html source)": {
"comment": "Use R: to ensure this matches after any other injections.",
"patterns": [
{
@@ -24,7 +29,7 @@
"name": "HTML",
"patterns": [
{
- "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*></\\2>)",
+ "begin": "(<)([a-zA-Z][a-zA-Z0-9:-]*)(?=[^>]*></\\2>)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.html"
@@ -139,97 +144,291 @@
"include": "#embedded-code"
},
{
- "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)",
- "captures": {
+ "begin": "(^[ \\t]+)?(?=<(?i:style))",
+ "beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.html"
- },
- "2": {
- "name": "entity.name.tag.style.html"
- },
- "3": {
- "name": "punctuation.definition.tag.html"
+ "name": "punctuation.whitespace.embedded.leading.html"
+ }
+ },
+ "end": "(?!\\G)([ \\t]*$\\n?)?",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.embedded.trailing.html"
}
},
- "end": "(</)((?i:style))(>)(?:\\s*\\n)?",
- "name": "source.css.embedded.html",
"patterns": [
{
- "include": "#tag-stuff"
- },
- {
- "begin": "(>)",
+ "begin": "(<)((?i:style))\\b",
"beginCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.style.html"
+ },
"1": {
- "name": "punctuation.definition.tag.html"
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "entity.name.tag.html"
+ }
+ },
+ "end": "(/>)|((<)/)((?i:style))(>)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.style.html"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ },
+ "2": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "3": {
+ "name": "source.css"
+ },
+ "4": {
+ "name": "entity.name.tag.html"
+ },
+ "5": {
+ "name": "punctuation.definition.tag.end.html"
}
},
- "end": "(?=</(?i:style))",
+ "name": "meta.embedded.block.html",
"patterns": [
{
- "include": "#embedded-code"
+ "begin": "\\G",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ }
+ },
+ "end": "(?=/>)|(>)",
+ "name": "meta.tag.metadata.style.html",
+ "patterns": [
+ {
+ "include": "#tag-stuff"
+ }
+ ]
},
{
- "include": "source.css"
+ "begin": "(?!\\G)",
+ "end": "(?=</(?i:style))",
+ "name": "source.css",
+ "patterns": [
+ {
+ "include": "#embedded-code"
+ },
+ {
+ "include": "source.css"
+ }
+ ]
}
]
}
]
},
{
- "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript).*)))",
+ "begin": "(^[ \\t]+)?(?=<(?i:script))",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.html"
- },
- "2": {
- "name": "entity.name.tag.script.html"
+ "name": "punctuation.whitespace.embedded.leading.html"
}
},
- "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
+ "end": "(?!\\G)([ \\t]*$\\n?)?",
"endCaptures": {
- "2": {
- "name": "punctuation.definition.tag.html"
+ "1": {
+ "name": "punctuation.whitespace.embedded.trailing.html"
}
},
- "name": "source.js.embedded.html",
"patterns": [
{
- "include": "#tag-stuff"
- },
- {
- "begin": "(?<!</(?:script|SCRIPT))(>)",
- "captures": {
+ "begin": "(<)((?i:script))\\b",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.script.html"
+ },
"1": {
- "name": "punctuation.definition.tag.html"
+ "name": "punctuation.definition.tag.begin.html"
},
"2": {
- "name": "entity.name.tag.script.html"
+ "name": "entity.name.tag.html"
}
},
- "end": "(</)((?i:script))",
- "patterns": [
- {
- "captures": {
- "1": {
- "name": "punctuation.definition.comment.js"
- }
- },
- "match": "(//).*?((?=</script)|$\\n?)",
- "name": "comment.line.double-slash.js"
+ "end": "(/>)|(/)((?i:script))(>)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.script.html"
},
- {
- "begin": "/\\*",
- "captures": {
- "0": {
- "name": "punctuation.definition.comment.js"
- }
- },
- "end": "\\*/|(?=</script)",
- "name": "comment.block.js"
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
},
+ "2": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "3": {
+ "name": "entity.name.tag.html"
+ },
+ "4": {
+ "name": "punctuation.definition.tag.end.html"
+ }
+ },
+ "name": "meta.embedded.block.html",
+ "patterns": [
{
- "include": "source.js"
+ "begin": "\\G",
+ "end": "(?=/>|/)",
+ "patterns": [
+ {
+ "begin": "(>)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.script.html"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ }
+ },
+ "end": "((<))(?=/(?i:script))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.script.html"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "source.js"
+ }
+ },
+ "patterns": [
+ {
+ "begin": "\\G",
+ "end": "(?=</(?i:script))",
+ "name": "source.js",
+ "patterns": [
+ {
+ "begin": "(^[ \\t]+)?(?=//)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.leading.js"
+ }
+ },
+ "end": "(?!\\G)",
+ "patterns": [
+ {
+ "begin": "//",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.js"
+ }
+ },
+ "end": "(?=</script)|\\n",
+ "name": "comment.line.double-slash.js"
+ }
+ ]
+ },
+ {
+ "begin": "/\\*",
+ "captures": {
+ "0": {
+ "name": "punctuation.definition.comment.js"
+ }
+ },
+ "end": "\\*/|(?=</script)",
+ "name": "comment.block.js"
+ },
+ {
+ "include": "source.js"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "begin": "\\G",
+ "end": "(?i:(?=/?>|type(?=[\\s=])(?!\\s*=\\s*('|\"|)(text/(javascript|ecmascript|babel)|application/((x-)?javascript|ecmascript|babel)|module)[\\s\"'>])))",
+ "name": "meta.tag.metadata.script.html",
+ "patterns": [
+ {
+ "include": "#tag-stuff"
+ }
+ ]
+ },
+ {
+ "begin": "(?=(?i:type\\s*=\\s*('|\"|)(text/(x-handlebars|(x-(handlebars-)?|ng-)?template|html)[\\s\"'>])))",
+ "end": "((<))(?=/(?i:script))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.script.html"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ },
+ "2": {
+ "name": "text.html.basic"
+ }
+ },
+ "patterns": [
+ {
+ "begin": "\\G",
+ "end": "(>)|(?=/>)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ }
+ },
+ "name": "meta.tag.metadata.script.html",
+ "patterns": [
+ {
+ "include": "#tag-stuff"
+ }
+ ]
+ },
+ {
+ "begin": "(?!\\G)",
+ "end": "(?=</(?i:script))",
+ "name": "text.html.basic",
+ "patterns": [
+ {
+ "include": "text.html.basic"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "begin": "(?=(?i:type))",
+ "end": "(<)(?=/(?i:script))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.metadata.script.html"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.begin.html"
+ }
+ },
+ "patterns": [
+ {
+ "begin": "\\G",
+ "end": "(>)|(?=/>)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.html"
+ }
+ },
+ "name": "meta.tag.metadata.script.html",
+ "patterns": [
+ {
+ "include": "#tag-stuff"
+ }
+ ]
+ },
+ {
+ "begin": "(?!\\G)",
+ "end": "(?=</(?i:script))",
+ "name": "source.unknown"
+ }
+ ]
+ }
+ ]
}
]
}
@@ -277,7 +476,7 @@
]
},
{
- "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)",
+ "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b(?!-))",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
@@ -300,7 +499,7 @@
]
},
{
- "begin": "(</?)([a-zA-Z0-9:]+)",
+ "begin": "(</?)([a-zA-Z][a-zA-Z0-9:-]*)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.begin.html"
@@ -309,7 +508,7 @@
"name": "entity.name.tag.other.html"
}
},
- "end": "(>)",
+ "end": "(/?>)",
"endCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
@@ -548,6 +747,5 @@
}
},
"scopeName": "text.html.basic",
- "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6",
- "version": "https://github.com/textmate/html.tmbundle/commit/9f812c89f4990a98391701caa77824c94860538f"
+ "uuid": "17994EC8-6B1D-11D9-AC3A-000D93589AF6"
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/java/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/java/package.json
index 07e901cc20..d8c9375f0c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/java/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/java/package.json
@@ -4,7 +4,7 @@
"publisher": "vscode",
"engines": { "vscode": "*" },
"scripts": {
- "update-grammar": "node ../../build/npm/update-grammar.js textmate/java.tmbundle Syntaxes/Java.plist ./syntaxes/java.json"
+ "update-grammar": "node ../../build/npm/update-grammar.js atom/language-java grammars/java.cson ./syntaxes/java.tmLanguage.json"
},
"contributes": {
"languages": [{
@@ -16,7 +16,7 @@
"grammars": [{
"language": "java",
"scopeName": "source.java",
- "path": "./syntaxes/java.json"
+ "path": "./syntaxes/java.tmLanguage.json"
}]
}
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/OSSREADME.json
index 9723276eec..89a7912b23 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/OSSREADME.json
@@ -2,16 +2,197 @@
[{
"name": "Microsoft/TypeScript-TmLanguage",
- "license": "MIT",
+ "version": "0.0.1",
+ "license": "Apache2",
"repositoryURL": "https://github.com/Microsoft/TypeScript-TmLanguage",
- "repositoryRevision": "fea3b25",
"description": "The file syntaxes/JavaScript.tmLanguage.json was derived from TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage.",
+ "licenseDetail": [
+ // Reason: LICENSE file does not include Copyright statement
+ "Copyright (c) Microsoft Corporation. All rights reserved.",
+ "",
+ " Apache License",
+ " Version 2.0, January 2004",
+ " http://www.apache.org/licenses/",
+ "",
+ " TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION",
+ "",
+ " 1. Definitions.",
+ "",
+ " \"License\" shall mean the terms and conditions for use, reproduction,",
+ " and distribution as defined by Sections 1 through 9 of this document.",
+ "",
+ " \"Licensor\" shall mean the copyright owner or entity authorized by",
+ " the copyright owner that is granting the License.",
+ "",
+ " \"Legal Entity\" shall mean the union of the acting entity and all",
+ " other entities that control, are controlled by, or are under common",
+ " control with that entity. For the purposes of this definition,",
+ " \"control\" means (i) the power, direct or indirect, to cause the",
+ " direction or management of such entity, whether by contract or",
+ " otherwise, or (ii) ownership of fifty percent (50%) or more of the",
+ " outstanding shares, or (iii) beneficial ownership of such entity.",
+ "",
+ " \"You\" (or \"Your\") shall mean an individual or Legal Entity",
+ " exercising permissions granted by this License.",
+ "",
+ " \"Source\" form shall mean the preferred form for making modifications,",
+ " including but not limited to software source code, documentation",
+ " source, and configuration files.",
+ "",
+ " \"Object\" form shall mean any form resulting from mechanical",
+ " transformation or translation of a Source form, including but",
+ " not limited to compiled object code, generated documentation,",
+ " and conversions to other media types.",
+ "",
+ " \"Work\" shall mean the work of authorship, whether in Source or",
+ " Object form, made available under the License, as indicated by a",
+ " copyright notice that is included in or attached to the work",
+ " (an example is provided in the Appendix below).",
+ "",
+ " \"Derivative Works\" shall mean any work, whether in Source or Object",
+ " form, that is based on (or derived from) the Work and for which the",
+ " editorial revisions, annotations, elaborations, or other modifications",
+ " represent, as a whole, an original work of authorship. For the purposes",
+ " of this License, Derivative Works shall not include works that remain",
+ " separable from, or merely link (or bind by name) to the interfaces of,",
+ " the Work and Derivative Works thereof.",
+ "",
+ " \"Contribution\" shall mean any work of authorship, including",
+ " the original version of the Work and any modifications or additions",
+ " to that Work or Derivative Works thereof, that is intentionally",
+ " submitted to Licensor for inclusion in the Work by the copyright owner",
+ " or by an individual or Legal Entity authorized to submit on behalf of",
+ " the copyright owner. For the purposes of this definition, \"submitted\"",
+ " means any form of electronic, verbal, or written communication sent",
+ " to the Licensor or its representatives, including but not limited to",
+ " communication on electronic mailing lists, source code control systems,",
+ " and issue tracking systems that are managed by, or on behalf of, the",
+ " Licensor for the purpose of discussing and improving the Work, but",
+ " excluding communication that is conspicuously marked or otherwise",
+ " designated in writing by the copyright owner as \"Not a Contribution.\"",
+ "",
+ " \"Contributor\" shall mean Licensor and any individual or Legal Entity",
+ " on behalf of whom a Contribution has been received by Licensor and",
+ " subsequently incorporated within the Work.",
+ "",
+ " 2. Grant of Copyright License. Subject to the terms and conditions of",
+ " this License, each Contributor hereby grants to You a perpetual,",
+ " worldwide, non-exclusive, no-charge, royalty-free, irrevocable",
+ " copyright license to reproduce, prepare Derivative Works of,",
+ " publicly display, publicly perform, sublicense, and distribute the",
+ " Work and such Derivative Works in Source or Object form.",
+ "",
+ " 3. Grant of Patent License. Subject to the terms and conditions of",
+ " this License, each Contributor hereby grants to You a perpetual,",
+ " worldwide, non-exclusive, no-charge, royalty-free, irrevocable",
+ " (except as stated in this section) patent license to make, have made,",
+ " use, offer to sell, sell, import, and otherwise transfer the Work,",
+ " where such license applies only to those patent claims licensable",
+ " by such Contributor that are necessarily infringed by their",
+ " Contribution(s) alone or by combination of their Contribution(s)",
+ " with the Work to which such Contribution(s) was submitted. If You",
+ " institute patent litigation against any entity (including a",
+ " cross-claim or counterclaim in a lawsuit) alleging that the Work",
+ " or a Contribution incorporated within the Work constitutes direct",
+ " or contributory patent infringement, then any patent licenses",
+ " granted to You under this License for that Work shall terminate",
+ " as of the date such litigation is filed.",
+ "",
+ " 4. Redistribution. You may reproduce and distribute copies of the",
+ " Work or Derivative Works thereof in any medium, with or without",
+ " modifications, and in Source or Object form, provided that You",
+ " meet the following conditions:",
+ "",
+ " (a) You must give any other recipients of the Work or",
+ " Derivative Works a copy of this License; and",
+ "",
+ " (b) You must cause any modified files to carry prominent notices",
+ " stating that You changed the files; and",
+ "",
+ " (c) You must retain, in the Source form of any Derivative Works",
+ " that You distribute, all copyright, patent, trademark, and",
+ " attribution notices from the Source form of the Work,",
+ " excluding those notices that do not pertain to any part of",
+ " the Derivative Works; and",
+ "",
+ " (d) If the Work includes a \"NOTICE\" text file as part of its",
+ " distribution, then any Derivative Works that You distribute must",
+ " include a readable copy of the attribution notices contained",
+ " within such NOTICE file, excluding those notices that do not",
+ " pertain to any part of the Derivative Works, in at least one",
+ " of the following places: within a NOTICE text file distributed",
+ " as part of the Derivative Works; within the Source form or",
+ " documentation, if provided along with the Derivative Works; or,",
+ " within a display generated by the Derivative Works, if and",
+ " wherever such third-party notices normally appear. The contents",
+ " of the NOTICE file are for informational purposes only and",
+ " do not modify the License. You may add Your own attribution",
+ " notices within Derivative Works that You distribute, alongside",
+ " or as an addendum to the NOTICE text from the Work, provided",
+ " that such additional attribution notices cannot be construed",
+ " as modifying the License.",
+ "",
+ " You may add Your own copyright statement to Your modifications and",
+ " may provide additional or different license terms and conditions",
+ " for use, reproduction, or distribution of Your modifications, or",
+ " for any such Derivative Works as a whole, provided Your use,",
+ " reproduction, and distribution of the Work otherwise complies with",
+ " the conditions stated in this License.",
+ "",
+ " 5. Submission of Contributions. Unless You explicitly state otherwise,",
+ " any Contribution intentionally submitted for inclusion in the Work",
+ " by You to the Licensor shall be under the terms and conditions of",
+ " this License, without any additional terms or conditions.",
+ " Notwithstanding the above, nothing herein shall supersede or modify",
+ " the terms of any separate license agreement you may have executed",
+ " with Licensor regarding such Contributions.",
+ "",
+ " 6. Trademarks. This License does not grant permission to use the trade",
+ " names, trademarks, service marks, or product names of the Licensor,",
+ " except as required for reasonable and customary use in describing the",
+ " origin of the Work and reproducing the content of the NOTICE file.",
+ "",
+ " 7. Disclaimer of Warranty. Unless required by applicable law or",
+ " agreed to in writing, Licensor provides the Work (and each",
+ " Contributor provides its Contributions) on an \"AS IS\" BASIS,",
+ " WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or",
+ " implied, including, without limitation, any warranties or conditions",
+ " of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A",
+ " PARTICULAR PURPOSE. You are solely responsible for determining the",
+ " appropriateness of using or redistributing the Work and assume any",
+ " risks associated with Your exercise of permissions under this License.",
+ "",
+ " 8. Limitation of Liability. In no event and under no legal theory,",
+ " whether in tort (including negligence), contract, or otherwise,",
+ " unless required by applicable law (such as deliberate and grossly",
+ " negligent acts) or agreed to in writing, shall any Contributor be",
+ " liable to You for damages, including any direct, indirect, special,",
+ " incidental, or consequential damages of any character arising as a",
+ " result of this License or out of the use or inability to use the",
+ " Work (including but not limited to damages for loss of goodwill,",
+ " work stoppage, computer failure or malfunction, or any and all",
+ " other commercial damages or losses), even if such Contributor",
+ " has been advised of the possibility of such damages.",
+ "",
+ " 9. Accepting Warranty or Additional Liability. While redistributing",
+ " the Work or Derivative Works thereof, You may choose to offer,",
+ " and charge a fee for, acceptance of support, warranty, indemnity,",
+ " or other liability obligations and/or rights consistent with this",
+ " License. However, in accepting such obligations, You may act only",
+ " on Your own behalf and on Your sole responsibility, not on behalf",
+ " of any other Contributor, and only if You agree to indemnify,",
+ " defend, and hold each Contributor harmless for any liability",
+ " incurred by, or claims asserted against, such Contributor by reason",
+ " of your accepting any such warranty or additional liability.",
+ "",
+ " END OF TERMS AND CONDITIONS"
+ ]
},
{
"name": "textmate/javascript.tmbundle",
+ "version": "0.0.0",
"license": "TextMate Bundle License",
"repositoryURL": "https://github.com/textmate/javascript.tmbundle",
- "repositoryRevision": "d5ed27f",
"licenseDetail": [
"Copyright (c) textmate-javascript.tmbundle project authors",
"",
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/npm-shrinkwrap.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/npm-shrinkwrap.json
index 87b6d53871..0ea3a3fbf9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/npm-shrinkwrap.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/npm-shrinkwrap.json
@@ -28,9 +28,8 @@
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-0.3.6.tgz"
},
"jsonc-parser": {
- "version": "0.2.3",
- "from": "jsonc-parser@>=0.2.2 <0.3.0",
- "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-0.2.3.tgz"
+ "version": "0.3.1",
+ "from": "jsonc-parser@0.3.1"
},
"ms": {
"version": "0.7.1",
@@ -38,14 +37,13 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz"
},
"request-light": {
- "version": "0.1.0",
- "from": "request-light@>=0.1.0 <0.2.0",
- "resolved": "https://registry.npmjs.org/request-light/-/request-light-0.1.0.tgz"
+ "version": "0.2.0",
+ "from": "request-light@0.2.0"
},
"vscode-nls": {
- "version": "1.0.7",
- "from": "vscode-nls@>=1.0.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz"
+ "version": "2.0.2",
+ "from": "vscode-nls@>=2.0.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz"
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/package.json
index b08729bbe1..b8c76ba64a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/package.json
@@ -1,106 +1,134 @@
{
- "name": "javascript",
- "version": "0.1.0",
- "publisher": "vscode",
- "engines": { "vscode": "0.10.x" },
- "activationEvents": [
- "onLanguage:javascript", "onLanguage:json"
- ],
- "main": "./out/javascriptMain",
- "dependencies": {
- "vscode-nls": "^1.0.4",
- "request-light": "^0.1.0",
- "jsonc-parser": "^0.2.2"
- },
- "scripts": {
- "compile": "gulp compile-extension:javascript",
- "watch": "gulp watch-extension:javascript"
- },
- "contributes": {
- "languages": [
- {
- "id": "javascriptreact",
- "aliases": [
- "JavaScript React",
- "jsx"
- ],
- "extensions": [
- ".jsx"
- ],
- "configuration": "./language-configuration.json"
- },
- {
- "id": "javascript",
- "aliases": [
- "JavaScript",
- "javascript",
- "js"
- ],
- "extensions": [
- ".js",
- ".es6"
- ],
- "filenames": [
- "jakefile"
- ],
- "firstLine": "^#!.*\\bnode",
- "mimetypes": [
- "text/javascript"
- ],
- "configuration": "./language-configuration.json"
- }
- ],
- "grammars": [
- {
- "language": "javascriptreact",
- "scopeName": "source.js",
- "path": "./syntaxes/JavaScript.tmLanguage.json"
- },
- {
- "language": "javascript",
- "scopeName": "source.js",
- "path": "./syntaxes/JavaScript.tmLanguage.json"
- },
- {
- "scopeName": "source.js.regexp",
- "path": "./syntaxes/Regular Expressions (JavaScript).tmLanguage"
- }
- ],
- "snippets": [
- {
- "language": "javascript",
- "path": "./snippets/javascript.json"
- },
- {
- "language": "javascriptreact",
- "path": "./snippets/javascriptreact.json"
- }
- ],
- "jsonValidation": [
- {
- "fileMatch": "package.json",
- "url": "http://json.schemastore.org/package"
- },
- {
- "fileMatch": "bower.json",
- "url": "http://json.schemastore.org/bower"
- },
- {
- "fileMatch": ".bower.json",
- "url": "http://json.schemastore.org/bower"
- },
- {
- "fileMatch": ".bowerrc",
- "url": "http://json.schemastore.org/bowerrc"
- },
- {
- "fileMatch": "jsconfig.json",
- "url": "./schemas/jsconfig.schema.json"
- },
- {
- "fileMatch": "jsconfig.json",
- "url": "http://json.schemastore.org/jsconfig"
- }
- ]
- }
+ "name": "javascript",
+ "version": "0.1.0",
+ "publisher": "vscode",
+ "engines": {
+ "vscode": "0.10.x"
+ },
+ "activationEvents": [
+ "onLanguage:javascript",
+ "onLanguage:json"
+ ],
+ "main": "./out/javascriptMain",
+ "dependencies": {
+ "jsonc-parser": "^0.3.1",
+ "request-light": "^0.2.0",
+ "vscode-nls": "^2.0.2"
+ },
+ "scripts": {
+ "compile": "gulp compile-extension:javascript",
+ "watch": "gulp watch-extension:javascript"
+ },
+ "contributes": {
+ "languages": [
+ {
+ "id": "javascriptreact",
+ "aliases": [
+ "JavaScript React",
+ "jsx"
+ ],
+ "extensions": [
+ ".jsx"
+ ],
+ "configuration": "./javascript-language-configuration.json"
+ },
+ {
+ "id": "javascript",
+ "aliases": [
+ "JavaScript",
+ "javascript",
+ "js"
+ ],
+ "extensions": [
+ ".js",
+ ".es6",
+ ".mjs"
+ ],
+ "filenames": [
+ "jakefile"
+ ],
+ "firstLine": "^#!.*\\bnode",
+ "mimetypes": [
+ "text/javascript"
+ ],
+ "configuration": "./javascript-language-configuration.json"
+ },
+ {
+ "id": "jsx-tags",
+ "aliases": [],
+ "configuration": "./tags-language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "javascriptreact",
+ "scopeName": "source.js",
+ "path": "./syntaxes/JavaScript.tmLanguage.json",
+ "embeddedLanguages": {
+ "meta.tag.js": "jsx-tags",
+ "meta.tag.without-attributes.js": "jsx-tags"
+ }
+ },
+ {
+ "language": "javascript",
+ "scopeName": "source.js",
+ "path": "./syntaxes/JavaScript.tmLanguage.json",
+ "embeddedLanguages": {
+ "meta.tag.js": "jsx-tags",
+ "meta.tag.without-attributes.js": "jsx-tags"
+ }
+ },
+ {
+ "scopeName": "source.js.regexp",
+ "path": "./syntaxes/Regular Expressions (JavaScript).tmLanguage"
+ }
+ ],
+ "snippets": [
+ {
+ "language": "javascript",
+ "path": "./snippets/javascript.json"
+ },
+ {
+ "language": "javascriptreact",
+ "path": "./snippets/javascriptreact.json"
+ }
+ ],
+ "jsonValidation": [
+ {
+ "fileMatch": "package.json",
+ "url": "http://json.schemastore.org/package"
+ },
+ {
+ "fileMatch": "bower.json",
+ "url": "http://json.schemastore.org/bower"
+ },
+ {
+ "fileMatch": ".bower.json",
+ "url": "http://json.schemastore.org/bower"
+ },
+ {
+ "fileMatch": ".bowerrc",
+ "url": "http://json.schemastore.org/bowerrc"
+ },
+ {
+ "fileMatch": "jsconfig.json",
+ "url": "http://json.schemastore.org/jsconfig"
+ },
+ {
+ "fileMatch": "jsconfig.json",
+ "url": "./schemas/jsconfig.schema.json"
+ },
+ {
+ "fileMatch": "jsconfig.*.json",
+ "url": "http://json.schemastore.org/jsconfig"
+ },
+ {
+ "fileMatch": "jsconfig.*.json",
+ "url": "./schemas/jsconfig.schema.json"
+ }
+ ]
+ },
+ "devDependencies": {
+ "@types/node": "^7.0.4"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/syntaxes/JavaScript.tmLanguage.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/syntaxes/JavaScript.tmLanguage.json
index dbc98e32af..57c071374c 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/syntaxes/JavaScript.tmLanguage.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/syntaxes/JavaScript.tmLanguage.json
@@ -1,185 +1,354 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
+ "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f",
+ "name": "JavaScript (with React support)",
+ "scopeName": "source.js",
"fileTypes": [
".js",
- ".jsx"
+ ".jsx",
+ ".es6",
+ ".mjs"
],
- "name": "JavaScript (with React support)",
+ "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
"patterns": [
{
- "include": "#expression"
- }
- ],
- "repository": {
- "access-modifier": {
- "match": "\\b(public|protected|private)\\b",
- "name": "storage.modifier.js"
+ "include": "#directives"
},
- "arithmetic-operator": {
- "match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%",
- "name": "keyword.operator.arithmetic.js"
+ {
+ "include": "#statements"
},
- "array-literal": {
- "begin": "\\[",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.square.js"
- }
- },
- "end": "\\]",
- "endCaptures": {
- "0": {
- "name": "meta.brace.square.js"
+ {
+ "name": "comment.line.shebang.ts",
+ "match": "\\A(#!).*(?=$)",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.comment.ts"
}
- },
- "name": "meta.array.literal.js",
+ }
+ }
+ ],
+ "repository": {
+ "statements": {
"patterns": [
{
+ "include": "#string"
+ },
+ {
+ "include": "#template"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#declaration"
+ },
+ {
+ "include": "#switch-statement"
+ },
+ {
+ "include": "#for-loop"
+ },
+ {
+ "include": "#after-operator-block"
+ },
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#control-statement"
+ },
+ {
"include": "#expression"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "assignment-operator": {
- "match": "<<=|>>>=|>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=",
- "name": "keyword.operator.assignment.js"
- },
- "await-modifier": {
- "match": "\\bawait\\b",
- "name": "storage.modifier.js"
- },
- "block": {
- "begin": "\\{",
+ "var-expr": {
+ "name": "meta.var.expr.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.curly.js"
- }
- },
- "end": "\\}",
- "endCaptures": {
- "0": {
- "name": "meta.brace.curly.js"
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "storage.type.js"
}
},
- "name": "meta.block.js",
+ "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
- "include": "#object-member"
+ "include": "#destructuring-variable"
},
{
- "include": "#expression"
+ "include": "#var-single-variable"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#punctuation-comma"
}
]
},
- "boolean-literal": {
- "match": "\\b(false|true)\\b",
- "name": "constant.language.boolean.js"
- },
- "case-clause": {
- "begin": "(?<!\\.)\\b(case|default(?=:))\\b",
- "beginCaptures": {
- "1": {
- "name": "keyword.control.js"
- }
- },
- "end": ":",
- "name": "case-clause.expr.js",
+ "var-single-variable": {
"patterns": [
{
- "include": "#expression-type"
+ "name": "meta.var-single-variable.expr.js",
+ "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.js entity.name.function.js"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ },
+ {
+ "name": "meta.var-single-variable.expr.js",
+ "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.js variable.other.constant.js"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ },
+ {
+ "name": "meta.var-single-variable.expr.js",
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.js variable.other.readwrite.js"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
}
]
},
- "comment": {
- "name": "comment.js",
+ "var-single-variable-type-annotation": {
"patterns": [
{
- "include": "#comment-block-doc"
+ "include": "#type-annotation"
},
{
- "include": "#comment-block"
+ "include": "#string"
},
{
- "include": "#comment-line"
+ "include": "#comment"
}
]
},
- "comment-block": {
- "begin": "/\\*",
- "end": "\\*/",
- "name": "comment.block.js"
- },
- "comment-block-doc": {
- "begin": "/\\*\\*(?!/)",
- "end": "\\*/",
- "name": "comment.block.documentation.js"
- },
- "comment-line": {
- "match": "(//).*$\\n?",
- "name": "comment.line.js"
- },
- "control-statement": {
- "match": "(?<!\\.)\\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|case|default|yield)\\b",
- "name": "keyword.control.js"
+ "destructuring-variable": {
+ "patterns": [
+ {
+ "name": "meta.object-binding-pattern-variable.js",
+ "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#comment"
+ }
+ ]
+ },
+ {
+ "name": "meta.array-binding-pattern-variable.js",
+ "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#array-binding-pattern"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#comment"
+ }
+ ]
+ }
+ ]
},
- "decl-block": {
- "begin": "\\{",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.curly.js"
+ "object-binding-element": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#object-binding-element-propertyName"
+ },
+ {
+ "include": "#binding-element"
+ }
+ ]
+ },
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#destructuring-variable-rest"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#punctuation-comma"
}
- },
- "end": "\\}",
+ ]
+ },
+ "object-binding-element-propertyName": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(:)",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.js"
+ "name": "punctuation.destructuring.js"
}
},
- "name": "meta.decl.block.js",
"patterns": [
{
- "include": "#expression"
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "name": "variable.object.property.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
- "declaration": {
- "name": "meta.declaration.js",
+ "binding-element": {
"patterns": [
{
- "include": "#function-declaration"
+ "include": "#comment"
},
{
- "include": "#object-declaration"
+ "include": "#object-binding-pattern"
},
{
- "include": "#type-declaration"
+ "include": "#array-binding-pattern"
},
{
- "include": "#enum-declaration"
+ "include": "#destructuring-variable-rest"
+ },
+ {
+ "include": "#variable-initializer"
}
]
},
- "enum-declaration": {
+ "destructuring-variable-rest": {
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
- "name": "storage.modifier.js"
+ "name": "keyword.operator.rest.js"
},
"2": {
- "name": "storage.type.js"
+ "name": "meta.definition.variable.js variable.other.readwrite.js"
+ }
+ }
+ },
+ "object-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.js"
},
- "3": {
- "name": "entity.name.class.js"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.object.js"
}
},
- "match": "(?:\\b(const)\\s+)?\\b(enum)\\s+([a-zA-Z_$][\\w$]*)",
- "name": "meta.enum.declaration.js"
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-binding-element"
+ }
+ ]
},
- "expression": {
- "name": "meta.expression.js",
+ "array-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.js"
+ },
+ "2": {
+ "name": "punctuation.definition.binding-pattern.array.js"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.js"
+ }
+ },
"patterns": [
{
- "include": "#jsx"
+ "include": "#binding-element"
},
{
- "include": "#for-in-simple"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "ternary-expression": {
+ "begin": "(\\?)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.js"
+ }
+ },
+ "end": "(:)",
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ "expression": {
+ "patterns": [
+ {
+ "include": "#jsx"
},
{
"include": "#string"
@@ -194,852 +363,1859 @@
"include": "#comment"
},
{
- "include": "#literal"
+ "include": "#function-expression"
},
{
- "include": "#paren-expression"
+ "include": "#class-or-interface-declaration"
},
{
- "include": "#var-expr"
+ "include": "#arrow-function"
},
{
- "include": "#declaration"
+ "include": "#cast"
},
{
- "include": "#new-expr"
- },
- {
- "include": "#switch-statement"
- },
- {
- "include": "#block"
- },
- {
- "include": "#import-operator"
- },
- {
- "include": "#expression-operator"
+ "include": "#ternary-expression"
},
{
- "include": "#imply-operator"
+ "include": "#new-expr"
},
{
- "include": "#relational-operator"
+ "include": "#object-literal"
},
{
- "include": "#arithmetic-operator"
+ "include": "#expression-operators"
},
{
- "include": "#logic-operator"
+ "include": "#function-call"
},
{
- "include": "#assignment-operator"
+ "include": "#literal"
},
{
- "include": "#storage-keyword"
+ "include": "#support-objects"
},
{
- "include": "#type-primitive"
+ "include": "#identifiers"
},
{
- "include": "#function-call"
+ "include": "#paren-expression"
},
{
- "include": "#case-clause"
+ "include": "#punctuation-comma"
},
{
- "include": "#control-statement"
+ "include": "#punctuation-accessor"
}
]
},
- "expression-operator": {
- "match": "\\b(delete|in|instanceof|new|typeof|as|is|of)\\b",
- "name": "keyword.others.js"
- },
- "expression-type": {
- "name": "meta.expression.js",
+ "control-statement": {
"patterns": [
{
- "include": "#string"
+ "name": "keyword.control.trycatch.js",
+ "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$|\\.)"
},
{
- "include": "#regex"
+ "name": "keyword.control.loop.js",
+ "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$|\\.)"
},
{
- "include": "#template"
+ "name": "keyword.control.flow.js",
+ "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$|\\.)"
},
{
- "include": "#comment"
+ "name": "keyword.control.switch.js",
+ "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$|\\.)"
},
{
- "include": "#literal"
+ "name": "keyword.control.conditional.js",
+ "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$|\\.)"
},
{
- "include": "#paren-expression"
+ "name": "keyword.control.with.js",
+ "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$|\\.)"
},
{
- "include": "#ternary-expression"
+ "name": "keyword.other.debugger.js",
+ "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$|\\.)"
},
{
- "include": "#import-operator"
+ "name": "storage.modifier.js",
+ "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$|\\.)"
+ }
+ ]
+ },
+ "declaration": {
+ "patterns": [
+ {
+ "include": "#decorator"
},
{
- "include": "#expression-operator"
+ "include": "#var-expr"
+ },
+ {
+ "include": "#function-declaration"
},
{
- "include": "#imply-operator"
+ "include": "#class-or-interface-declaration"
},
{
- "include": "#relational-operator"
+ "include": "#type-declaration"
},
{
- "include": "#arithmetic-operator"
+ "include": "#enum-declaration"
},
{
- "include": "#logic-operator"
+ "include": "#namespace-declaration"
},
{
- "include": "#assignment-operator"
+ "include": "#import-equals-declaration"
},
{
- "include": "#type-primitive"
+ "include": "#import-declaration"
},
{
- "include": "#function-call"
+ "include": "#export-declaration"
}
]
},
- "field-declaration": {
- "begin": "(?<!\\()\\s*((?:\\b[a-zA-Z_$][\\w$]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\"))\\s*(\\?\\s*)?(?=(=|:))",
+ "decorator": {
+ "name": "meta.decorator.js",
+ "begin": "(?<!\\.|\\$)\\@",
"beginCaptures": {
- "1": {
- "name": "variable.js"
- },
- "2": {
- "name": "keyword.others.js"
+ "0": {
+ "name": "punctuation.decorator.js"
}
},
- "end": "(?=\\}|;|,|$)|(?<=\\})",
- "name": "meta.field.declaration.js",
+ "end": "(?=\\s)",
"patterns": [
{
"include": "#expression"
}
]
},
- "for-in-simple": {
- "captures": {
+ "type-declaration": {
+ "name": "meta.type.declaration.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
+ "beginCaptures": {
"1": {
- "name": "storage.type.js"
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "storage.type.type.js"
},
"3": {
- "name": "keyword.others.js"
+ "name": "entity.name.type.alias.js"
}
},
- "match": "(?<=\\()\\s*\\b(var|let|const)\\s+([a-zA-Z_$][\\w$]*)\\s+(in|of)\\b",
- "name": "forin.expr.js"
- },
- "function-call": {
- "name": "functioncall.expr.js",
+ "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
"patterns": [
{
- "include": "#await-modifier"
+ "include": "#comment"
},
{
"include": "#type-parameters"
},
{
- "include": "#paren-expression"
+ "include": "#type"
+ },
+ {
+ "match": "(=)\\s*",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.assignment.js"
+ }
+ }
}
]
},
- "function-declaration": {
- "begin": "\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
+ "enum-declaration": {
+ "name": "meta.enum.declaration.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
"beginCaptures": {
"1": {
- "name": "storage.type.js"
+ "name": "keyword.control.export.js"
},
"2": {
"name": "storage.modifier.js"
},
"3": {
- "name": "storage.type.function.js"
+ "name": "storage.type.enum.js"
},
"4": {
- "name": "entity.name.function.js"
+ "name": "entity.name.type.enum.js"
}
},
- "end": "(?=;|\\})|(?<=\\})",
- "name": "meta.function.js",
+ "end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#type-parameters"
- },
- {
- "include": "#function-type-parameters"
- },
- {
- "include": "#return-type"
- },
- {
- "include": "#function-overload-declaration"
- },
- {
- "include": "#decl-block"
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
+ "beginCaptures": {
+ "0": {
+ "name": "variable.other.enummember.js"
+ }
+ },
+ "end": "(?=,|\\}|$)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#variable-initializer"
+ }
+ ]
+ },
+ {
+ "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
+ "end": "(?=,|\\}|$)",
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#variable-initializer"
+ }
+ ]
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
}
]
},
- "function-overload-declaration": {
- "captures": {
+ "namespace-declaration": {
+ "name": "meta.namespace.declaration.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`])",
+ "beginCaptures": {
"1": {
- "name": "storage.type.js"
+ "name": "keyword.control.export.js"
},
"2": {
- "name": "storage.type.function.js"
- },
- "3": {
- "name": "entity.name.function.js"
- }
- },
- "match": "\\b(?:(export)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
- "name": "meta.function.overload.js"
- },
- "function-type-parameters": {
- "begin": "\\(",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.round.js"
- }
- },
- "end": "\\)",
- "endCaptures": {
- "0": {
- "name": "meta.brace.round.js"
+ "name": "storage.type.namespace.js"
}
},
- "name": "meta.function.type.parameter.js",
+ "end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#parameter-name"
+ "include": "#string"
},
{
- "include": "#type-annotation"
+ "name": "entity.name.type.module.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
},
{
- "include": "#variable-initializer"
+ "include": "#punctuation-accessor"
+ },
+ {
+ "include": "#decl-block"
}
]
},
- "imply-operator": {
- "match": "=>",
- "name": "keyword.operator.js"
- },
- "import-operator": {
- "match": "\\b(import|from)\\b",
- "name": "keyword.control.import.include.js"
+ "import-equals-declaration": {
+ "patterns": [
+ {
+ "name": "meta.import-equals.external.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "keyword.control.import.js"
+ },
+ "3": {
+ "name": "variable.other.readwrite.alias.js"
+ },
+ "4": {
+ "name": "keyword.operator.assignment.js"
+ },
+ "5": {
+ "name": "keyword.control.require.js"
+ },
+ "6": {
+ "name": "meta.brace.round.js"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#string"
+ }
+ ]
+ },
+ {
+ "name": "meta.import-equals.internal.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "keyword.control.import.js"
+ },
+ "3": {
+ "name": "variable.other.readwrite.alias.js"
+ },
+ "4": {
+ "name": "keyword.operator.assignment.js"
+ }
+ },
+ "end": "(?=;|$)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ }
+ }
+ },
+ {
+ "name": "variable.other.readwrite.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ }
+ ]
+ }
+ ]
},
- "indexer-declaration": {
- "begin": "\\[",
+ "import-declaration": {
+ "name": "meta.import.js",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$|\\.))\\b",
"beginCaptures": {
- "0": {
- "name": "meta.brace.square.js"
- }
- },
- "end": "(\\])\\s*(\\?\\s*)?|$",
- "endCaptures": {
"1": {
- "name": "meta.brace.square.js"
+ "name": "keyword.control.export.js"
},
"2": {
- "name": "keyword.others.js"
+ "name": "keyword.control.import.js"
}
},
- "name": "meta.indexer.declaration.js",
+ "end": "(?=;|$)",
"patterns": [
{
- "include": "#type-annotation"
+ "include": "#import-export-declaration"
+ }
+ ]
+ },
+ "export-declaration": {
+ "patterns": [
+ {
+ "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "keyword.control.as.js"
+ },
+ "3": {
+ "name": "storage.type.namespace.js"
+ },
+ "4": {
+ "name": "entity.name.type.module.js"
+ }
+ }
},
{
- "include": "#indexer-parameter"
+ "name": "meta.export.default.js",
+ "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "keyword.operator.assignment.js"
+ },
+ "3": {
+ "name": "keyword.control.default.js"
+ }
+ },
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
},
{
- "include": "#expression"
+ "name": "meta.export.js",
+ "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.export.js"
+ }
+ },
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
+ "patterns": [
+ {
+ "include": "#import-export-declaration"
+ }
+ ]
}
]
},
- "indexer-parameter": {
- "captures": {
- "1": {
- "name": "variable.parameter.js"
- }
- },
- "match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
- "name": "meta.indexer.parameter.js"
- },
- "jsx": {
- "name": "meta.jsx.js",
+ "import-export-declaration": {
"patterns": [
{
- "include": "#jsx-tag-without-attributes"
+ "include": "#comment"
},
{
- "include": "#jsx-tag-open"
+ "include": "#string"
},
{
- "include": "#jsx-tag-close"
+ "include": "#import-export-block"
},
{
- "include": "#jsx-tag-invalid"
+ "name": "keyword.control.from.js",
+ "match": "\\bfrom\\b"
},
{
- "begin": "(?<=(?:'|\"|})>)",
- "end": "(?=</)",
- "name": "meta.jsx.children.js",
- "patterns": [
- {
- "include": "#jsx-children"
- }
- ]
+ "include": "#import-export-clause"
}
]
},
- "jsx-children": {
+ "import-export-block": {
+ "name": "meta.block.js",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
"patterns": [
{
- "include": "#jsx-tag-without-attributes"
+ "include": "#import-export-clause"
+ }
+ ]
+ },
+ "import-export-clause": {
+ "patterns": [
+ {
+ "include": "#comment"
},
{
- "include": "#jsx-tag-open"
+ "comment": "(default|*|name) as alias",
+ "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ \n (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
+ "captures": {
+ "1": {
+ "name": "keyword.control.default.js"
+ },
+ "2": {
+ "name": "constant.language.import-export-all.js"
+ },
+ "3": {
+ "name": "variable.other.readwrite.js"
+ },
+ "4": {
+ "name": "keyword.control.as.js"
+ },
+ "5": {
+ "name": "invalid.illegal.js"
+ },
+ "6": {
+ "name": "variable.other.readwrite.alias.js"
+ }
+ }
},
{
- "include": "#jsx-tag-close"
+ "include": "#punctuation-comma"
},
{
- "include": "#jsx-tag-invalid"
+ "name": "constant.language.import-export-all.js",
+ "match": "\\*"
},
{
- "include": "#jsx-evaluated-code"
+ "name": "keyword.control.default.js",
+ "match": "\\b(default)\\b"
},
{
- "include": "#jsx-entities"
+ "name": "variable.other.readwrite.alias.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
- "jsx-entities": {
+ "class-or-interface-declaration": {
"patterns": [
{
- "captures": {
+ "name": "meta.class.js",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
+ "beginCaptures": {
"1": {
- "name": "punctuation.definition.entity.js"
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "storage.modifier.js"
},
"3": {
- "name": "punctuation.definition.entity.js"
+ "name": "storage.type.class.js"
}
},
- "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
- "name": "constant.character.entity.js"
+ "end": "(?<=\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.class.js"
+ }
+ }
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#class-or-interface-body"
+ }
+ ]
},
{
- "match": "&",
- "name": "invalid.illegal.bad-ampersand.js"
+ "name": "meta.interface.js",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "storage.modifier.js"
+ },
+ "3": {
+ "name": "storage.type.interface.js"
+ }
+ },
+ "end": "(?<=\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.interface.js"
+ }
+ }
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#class-or-interface-body"
+ }
+ ]
}
]
},
- "jsx-evaluated-code": {
- "begin": "{",
+ "class-or-interface-heritage": {
+ "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "punctuation.definition.brace.curly.start.js"
+ "1": {
+ "name": "storage.modifier.js"
}
},
- "end": "}",
+ "end": "(?=\\{)",
"endCaptures": {
- "0": {
- "name": "punctuation.definition.brace.curly.end.js"
+ "1": {
+ "name": "punctuation.definition.block.js"
}
},
- "name": "meta.brace.curly.js",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ }
+ }
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
+ "captures": {
+ "1": {
+ "name": "entity.other.inherited-class.js"
+ }
+ }
+ },
+ {
"include": "#expression"
}
]
},
- "jsx-string-double-quoted": {
- "begin": "\"",
+ "class-or-interface-body": {
+ "begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.definition.string.begin.js"
+ "name": "punctuation.definition.block.js"
}
},
- "end": "\"",
+ "end": "\\}",
"endCaptures": {
"0": {
- "name": "punctuation.definition.string.end.js"
+ "name": "punctuation.definition.block.js"
}
},
- "name": "string.quoted.double.js",
"patterns": [
{
- "include": "#jsx-entities"
+ "include": "#string"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#decorator"
+ },
+ {
+ "include": "#method-declaration"
+ },
+ {
+ "include": "#indexer-declaration"
+ },
+ {
+ "include": "#field-declaration"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#access-modifier"
+ },
+ {
+ "include": "#property-accessor"
+ },
+ {
+ "include": "#after-operator-block"
+ },
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#expression"
+ },
+ {
+ "include": "#punctuation-comma"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "jsx-string-single-quoted": {
- "begin": "'",
+ "type-object": {
+ "name": "meta.object.type.js",
+ "begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.definition.string.begin.js"
+ "name": "punctuation.definition.block.js"
}
},
- "end": "'",
+ "end": "\\}",
"endCaptures": {
"0": {
- "name": "punctuation.definition.string.end.js"
+ "name": "punctuation.definition.block.js"
}
},
- "name": "string.quoted.single.js",
"patterns": [
{
- "include": "#jsx-entities"
+ "include": "#comment"
+ },
+ {
+ "include": "#method-declaration"
+ },
+ {
+ "include": "#indexer-declaration"
+ },
+ {
+ "include": "#indexer-mapped-type-declaration"
+ },
+ {
+ "include": "#field-declaration"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "begin": "\\.\\.\\.",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.spread.js"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "include": "#punctuation-comma"
+ },
+ {
+ "include": "#punctuation-semicolon"
+ },
+ {
+ "include": "#type"
}
]
},
- "jsx-tag-attribute-assignment": {
- "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))",
- "name": "keyword.operator.assignment.js"
- },
- "jsx-tag-attribute-name": {
- "captures": {
+ "field-declaration": {
+ "name": "meta.field.declaration.js",
+ "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
+ "beginCaptures": {
"1": {
- "name": "entity.other.attribute-name.js"
+ "name": "storage.modifier.js"
}
},
- "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
- "name": "meta.tag.attribute-name.js"
+ "end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
+ "end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "name": "meta.definition.property.js entity.name.function.js",
+ "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)"
+ },
+ {
+ "name": "meta.definition.property.js variable.object.property.js",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
+ },
+ {
+ "name": "keyword.operator.optional.js",
+ "match": "\\?"
+ }
+ ]
+ }
+ ]
},
- "jsx-tag-attributes": {
+ "method-declaration": {
"patterns": [
{
- "include": "#jsx-tag-attribute-name"
+ "name": "meta.method.declaration.js",
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.js"
+ },
+ "2": {
+ "name": "storage.modifier.js"
+ },
+ "3": {
+ "name": "storage.modifier.async.js"
+ },
+ "4": {
+ "name": "storage.type.property.js"
+ },
+ "5": {
+ "name": "keyword.generator.asterisk.js"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
},
{
- "include": "#jsx-tag-attribute-assignment"
+ "name": "meta.method.declaration.js",
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.js"
+ },
+ "2": {
+ "name": "storage.modifier.js"
+ },
+ "3": {
+ "name": "storage.modifier.async.js"
+ },
+ "4": {
+ "name": "keyword.operator.new.js"
+ },
+ "5": {
+ "name": "storage.type.js"
+ },
+ "6": {
+ "name": "keyword.generator.asterisk.js"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
+ }
+ ]
+ },
+ "method-declaration-name": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
+ "end": "(?=\\(|\\<)",
+ "patterns": [
+ {
+ "include": "#string"
},
{
- "include": "#jsx-string-double-quoted"
+ "include": "#array-literal"
},
{
- "include": "#jsx-string-single-quoted"
+ "name": "meta.definition.method.js entity.name.function.js",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
},
{
- "include": "#jsx-evaluated-code"
+ "name": "keyword.operator.optional.js",
+ "match": "\\?"
}
]
},
- "jsx-tag-attributes-illegal": {
- "match": "\\S+",
- "name": "invalid.illegal.attribute.js"
- },
- "jsx-tag-close": {
- "begin": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))",
+ "object-literal-method-declaration": {
+ "name": "meta.method.declaration.js",
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.js"
+ "name": "storage.modifier.async.js"
},
"2": {
- "name": "entity.name.tag.js"
+ "name": "storage.type.property.js"
+ },
+ "3": {
+ "name": "keyword.generator.asterisk.js"
}
},
- "end": "(>)",
- "endCaptures": {
+ "end": "(?=\\}|;|,)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#object-literal-method-overload-declaration"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
+ },
+ "object-literal-method-overload-declaration": {
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.end.js"
+ "name": "storage.modifier.async.js"
+ },
+ "2": {
+ "name": "storage.type.property.js"
+ },
+ "3": {
+ "name": "keyword.generator.asterisk.js"
}
},
- "name": "tag.close.js",
+ "end": "(?=\\(|\\<)",
"patterns": [
{
- "include": "#comment"
+ "include": "#method-declaration-name"
}
]
},
- "jsx-tag-invalid": {
- "match": "<\\s*>",
- "name": "invalid.illegal.tag.incomplete.js"
- },
- "jsx-tag-open": {
- "begin": "(?x)\n (<)\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
+ "indexer-declaration": {
+ "name": "meta.indexer.declaration.js",
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.js"
+ "name": "storage.modifier.js"
},
"2": {
- "name": "entity.name.tag.js"
+ "name": "meta.brace.square.js"
+ },
+ "3": {
+ "name": "variable.parameter.js"
}
},
- "end": "(/?>)",
+ "end": "(\\])\\s*(\\?\\s*)?|$",
"endCaptures": {
"1": {
- "name": "punctuation.definition.tag.end.js"
+ "name": "meta.brace.square.js"
+ },
+ "2": {
+ "name": "keyword.operator.optional.js"
}
},
- "name": "tag.open.js",
"patterns": [
{
- "include": "#comment"
- },
- {
- "include": "#jsx-tag-attributes"
- },
- {
- "include": "#jsx-tag-attributes-illegal"
+ "include": "#type-annotation"
}
]
},
- "jsx-tag-without-attributes": {
- "begin": "(<)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
+ "indexer-mapped-type-declaration": {
+ "name": "meta.indexer.mappedtype.declaration.js",
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.js"
+ "name": "storage.modifier.js"
},
"2": {
- "name": "entity.name.tag.js"
+ "name": "meta.brace.square.js"
},
"3": {
- "name": "punctuation.definition.tag.end.js"
+ "name": "entity.name.type.js"
+ },
+ "4": {
+ "name": "keyword.operator.expression.in.js"
}
},
- "end": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
+ "end": "(\\])\\s*(\\?\\s*)?|$",
"endCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.js"
+ "name": "meta.brace.square.js"
},
"2": {
- "name": "entity.name.tag.js"
- },
- "3": {
- "name": "punctuation.definition.tag.end.js"
+ "name": "keyword.operator.optional.js"
}
},
- "name": "tag.without-attributes.js",
"patterns": [
{
- "include": "#jsx-children"
+ "include": "#type"
}
]
},
- "literal": {
- "name": "literal.js",
- "patterns": [
- {
- "include": "#numeric-literal"
+ "function-declaration": {
+ "name": "meta.function.js",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.js"
+ },
+ "2": {
+ "name": "storage.modifier.async.js"
},
+ "3": {
+ "name": "storage.type.function.js"
+ },
+ "4": {
+ "name": "keyword.generator.asterisk.js"
+ },
+ "5": {
+ "name": "meta.definition.function.js entity.name.function.js"
+ }
+ },
+ "end": "(?=$|^|;)|(?<=\\})",
+ "patterns": [
{
- "include": "#boolean-literal"
+ "include": "#comment"
},
{
- "include": "#null-literal"
+ "include": "#type-parameters"
},
{
- "include": "#undefined-literal"
+ "include": "#function-parameters"
},
{
- "include": "#array-literal"
+ "include": "#return-type"
},
{
- "include": "#this-literal"
+ "include": "#decl-block"
}
]
},
- "logic-operator": {
- "match": "\\!|&&|&|~|\\^|\\|\\||\\|",
- "name": "keyword.operator.arithmetic.js"
- },
- "method-declaration": {
- "begin": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
+ "function-expression": {
+ "name": "meta.function.expression.js",
+ "begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
"beginCaptures": {
"1": {
- "name": "storage.modifier.js"
+ "name": "storage.modifier.async.js"
},
"2": {
- "name": "storage.modifier.js"
+ "name": "storage.type.function.js"
},
"3": {
- "name": "storage.modifier.js"
+ "name": "keyword.generator.asterisk.js"
},
"4": {
- "name": "storage.type.property.js"
+ "name": "meta.definition.function.js entity.name.function.js"
+ }
+ },
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#comment"
},
- "5": {
- "name": "keyword.operator.js"
+ {
+ "include": "#type-parameters"
},
- "6": {
- "name": "storage.type.js"
+ {
+ "include": "#function-parameters"
},
- "7": {
- "name": "entity.name.function.js"
+ {
+ "include": "#return-type"
},
- "8": {
- "name": "keyword.operator.js"
+ {
+ "include": "#decl-block"
+ }
+ ]
+ },
+ "object-literal": {
+ "name": "meta.objectliteral.js",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
}
},
- "end": "(?=\\}|;|,)|(?<=\\})",
- "name": "meta.method.declaration.js",
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-member"
+ }
+ ]
+ },
+ "decl-block": {
+ "name": "meta.block.js",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#statements"
+ }
+ ]
+ },
+ "after-operator-block": {
+ "name": "meta.objectliteral.js",
+ "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-member"
+ }
+ ]
+ },
+ "parameter-name": {
+ "patterns": [
+ {
+ "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.js"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.js"
+ },
+ "2": {
+ "name": "keyword.operator.rest.js"
+ },
+ "3": {
+ "name": "entity.name.function.js variable.language.this.js"
+ },
+ "4": {
+ "name": "entity.name.function.js"
+ },
+ "5": {
+ "name": "keyword.operator.optional.js"
+ }
+ }
+ },
+ {
+ "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:((?<!\\.|\\$)\\bthis\\b(?!\\.|\\$))|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.js"
+ },
+ "2": {
+ "name": "keyword.operator.rest.js"
+ },
+ "3": {
+ "name": "variable.parameter.js variable.language.this.js"
+ },
+ "4": {
+ "name": "variable.parameter.js"
+ },
+ "5": {
+ "name": "keyword.operator.optional.js"
+ }
+ }
+ }
+ ]
+ },
+ "destructuring-parameter": {
+ "patterns": [
+ {
+ "name": "meta.parameter.object-binding-pattern.js",
+ "begin": "(?<!=|:)\\s*(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.binding-pattern.object.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-object-binding-element"
+ }
+ ]
+ },
+ {
+ "name": "meta.paramter.array-binding-pattern.js",
+ "begin": "(?<!=|:)\\s*(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.binding-pattern.array.js"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-binding-element"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ }
+ ]
+ },
+ "parameter-object-binding-element": {
"patterns": [
{
"include": "#comment"
},
{
- "include": "#type-parameters"
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#object-binding-element-propertyName"
+ },
+ {
+ "include": "#parameter-binding-element"
+ }
+ ]
},
{
- "include": "#function-type-parameters"
+ "include": "#parameter-object-binding-pattern"
},
{
- "include": "#type-annotation"
+ "include": "#destructuring-parameter-rest"
},
{
- "include": "#method-overload-declaration"
+ "include": "#variable-initializer"
},
{
- "include": "#decl-block"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "parameter-binding-element": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#parameter-object-binding-pattern"
+ },
+ {
+ "include": "#parameter-array-binding-pattern"
+ },
+ {
+ "include": "#destructuring-parameter-rest"
+ },
+ {
+ "include": "#variable-initializer"
}
]
},
- "method-overload-declaration": {
+ "destructuring-parameter-rest": {
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
- "name": "storage.modifier.js"
+ "name": "keyword.operator.rest.js"
},
"2": {
- "name": "storage.modifier.js"
+ "name": "variable.parameter.js"
+ }
+ }
+ },
+ "parameter-object-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.js"
},
- "3": {
- "name": "storage.modifier.js"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.object.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-object-binding-element"
+ }
+ ]
+ },
+ "parameter-array-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.js"
},
- "4": {
- "name": "storage.type.property.js"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.array.js"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-binding-element"
},
- "5": {
- "name": "keyword.operator.js"
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "return-type": {
+ "name": "meta.return.type.js",
+ "begin": "(?<=\\))\\s*(:)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.type.annotation.js"
+ }
+ },
+ "end": "(?<![:|&])(?=$|^|[{};,]|//)",
+ "patterns": [
+ {
+ "include": "#comment"
},
- "6": {
- "name": "storage.type.js"
+ {
+ "begin": "(?<=[:])(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
- "7": {
- "name": "entity.name.function.js"
+ {
+ "include": "#type-predicate-operator"
},
- "8": {
- "name": "keyword.operator.js"
+ {
+ "include": "#type"
}
- },
- "match": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
- "name": "meta.method.overload.declaration.js"
+ ]
},
- "new-expr": {
- "begin": "\\b(new)\\b",
+ "type-predicate-operator": {
+ "name": "keyword.operator.expression.is.js",
+ "match": "(?<!\\.|\\$)\\bis\\b(?!\\$|\\.)"
+ },
+ "type-annotation": {
+ "name": "meta.type.annotation.js",
+ "begin": ":",
"beginCaptures": {
- "1": {
- "name": "keyword.others.js"
+ "0": {
+ "name": "keyword.operator.type.annotation.js"
}
},
- "end": "(?=[(;]|$)",
- "name": "new.expr.js",
+ "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
"include": "#type"
+ }
+ ]
+ },
+ "type": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#numeric-literal"
+ },
+ {
+ "include": "#type-primitive"
+ },
+ {
+ "include": "#type-builtin-literals"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#type-tuple"
+ },
+ {
+ "include": "#type-object"
+ },
+ {
+ "include": "#type-operators"
+ },
+ {
+ "include": "#type-fn-type-parameters"
},
{
+ "include": "#type-paren-or-function-parameters"
+ },
+ {
+ "include": "#type-function-return-type"
+ },
+ {
+ "include": "#type-name"
+ }
+ ]
+ },
+ "function-parameters": {
+ "name": "meta.parameters.js",
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.begin.js"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.end.js"
+ }
+ },
+ "patterns": [
+ {
"include": "#comment"
+ },
+ {
+ "include": "#decorator"
+ },
+ {
+ "include": "#destructuring-parameter"
+ },
+ {
+ "include": "#parameter-name"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "name": "punctuation.separator.parameter.js",
+ "match": ","
}
]
},
- "null-literal": {
- "match": "\\b(null)\\b",
- "name": "constant.language.null.js"
+ "type-primitive": {
+ "name": "support.type.primitive.js",
+ "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$|\\.)"
},
- "numeric-literal": {
- "match": "\\b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(0(o|O)[0-7]+)|(0(b|B)(0|1)+)|(([0-9]+(\\.[0-9]+)?))([eE]([+-]?)[0-9]+(\\.[0-9]+)?)?)\\b",
- "name": "constant.numeric.js"
+ "type-builtin-literals": {
+ "name": "support.type.builtin.js",
+ "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null|object)\\b(?!\\$|\\.)"
},
- "object-body": {
- "begin": "\\{",
+ "type-paren-or-function-parameters": {
+ "name": "meta.type.paren.cover.js",
+ "begin": "\\(",
"beginCaptures": {
"0": {
- "name": "meta.brace.curly.js"
+ "name": "meta.brace.round.js"
}
},
- "end": "\\}",
+ "end": "\\)",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.js"
+ "name": "meta.brace.round.js"
}
},
- "name": "meta.object.body.js",
"patterns": [
{
- "include": "#string"
+ "include": "#type"
},
{
- "include": "#comment"
+ "include": "#function-parameters"
+ }
+ ]
+ },
+ "type-fn-type-parameters": {
+ "patterns": [
+ {
+ "name": "meta.type.constructor.js",
+ "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.new.js"
+ }
+ }
},
{
- "include": "#field-declaration"
+ "name": "meta.type.constructor.js",
+ "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.new.js"
+ }
+ },
+ "end": "(?<=\\))",
+ "patterns": [
+ {
+ "include": "#function-parameters"
+ }
+ ]
},
{
- "include": "#method-declaration"
+ "name": "meta.type.function.js",
+ "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
+ "end": "(?<=\\))",
+ "patterns": [
+ {
+ "include": "#function-parameters"
+ }
+ ]
+ }
+ ]
+ },
+ "type-operators": {
+ "patterns": [
+ {
+ "include": "#typeof-operator"
},
{
- "include": "#indexer-declaration"
+ "begin": "([&|])(?=\\s*\\{)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.js"
+ }
+ },
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "include": "#type-annotation"
+ "begin": "[&|]",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.js"
+ }
+ },
+ "end": "(?=\\S)"
},
{
- "include": "#variable-initializer"
+ "name": "keyword.operator.expression.keyof.js",
+ "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$|\\.)"
+ }
+ ]
+ },
+ "type-function-return-type": {
+ "name": "meta.type.function.return.js",
+ "begin": "=>",
+ "beginCaptures": {
+ "0": {
+ "name": "storage.type.function.arrow.js"
+ }
+ },
+ "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
+ "patterns": [
+ {
+ "include": "#comment"
},
{
- "include": "#access-modifier"
+ "begin": "(?<==>)(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "include": "#static-modifier"
+ "include": "#type-predicate-operator"
},
{
- "include": "#property-accessor"
+ "include": "#type"
}
]
},
- "object-declaration": {
- "begin": "\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?<!\\.)(class|interface)\\b",
+ "type-tuple": {
+ "name": "meta.type.tuple.js",
+ "begin": "\\[",
"beginCaptures": {
- "1": {
- "name": "storage.type.js"
+ "0": {
+ "name": "meta.brace.square.js"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.square.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
},
- "2": {
- "name": "storage.modifier.js"
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "type-name": {
+ "patterns": [
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ }
+ }
},
- "3": {
- "name": "storage.type.js"
+ {
+ "name": "entity.name.type.js",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
+ }
+ ]
+ },
+ "type-parameters": {
+ "name": "meta.type.parameters.js",
+ "begin": "(<)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.typeparameters.begin.js"
}
},
- "end": "(?<=\\})",
+ "end": "(>)",
"endCaptures": {
"1": {
- "name": "brace.curly.js"
+ "name": "punctuation.definition.typeparameters.end.js"
}
},
- "name": "meta.declaration.object.js",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#object-heritage"
+ "name": "storage.modifier.js",
+ "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
},
{
- "include": "#object-name"
+ "name": "keyword.operator.assignment.js",
+ "match": "\\=(?!>)"
},
{
- "include": "#type-parameters"
+ "include": "#type"
},
{
- "include": "#object-body"
+ "include": "#punctuation-comma"
}
]
},
- "object-heritage": {
- "begin": "(?:\\b(extends|implements)\\b)",
+ "variable-initializer": {
+ "patterns": [
+ {
+ "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.js"
+ }
+ },
+ "end": "(?=$|^|[,);}\\]])",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "begin": "(?<!=|!)(=)(?!=)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.js"
+ }
+ },
+ "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ }
+ ]
+ },
+ "for-loop": {
+ "begin": "(?<!\\.|\\$)\\b(for)(?:\\s+(await))?\\s*(\\()",
"beginCaptures": {
"1": {
- "name": "keyword.other.js"
+ "name": "keyword.control.loop.js"
+ },
+ "2": {
+ "name": "keyword.control.loop.js"
+ },
+ "3": {
+ "name": "meta.brace.round.js"
}
},
- "end": "(?=\\{)",
+ "end": "\\)",
"endCaptures": {
- "1": {
- "name": "brace.curly.js"
+ "0": {
+ "name": "meta.brace.round.js"
}
},
- "name": "meta.object.heritage.js",
"patterns": [
{
- "include": "#comment"
- },
- {
- "include": "#object-heritage"
+ "include": "#var-expr"
},
{
- "include": "#type-parameters"
+ "include": "#expression"
},
{
- "include": "#object-heritage-type"
+ "include": "#punctuation-semicolon"
}
]
},
- "object-heritage-type": {
- "captures": {
+ "switch-expression": {
+ "name": "switch-expression.expr.js",
+ "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
+ "beginCaptures": {
"1": {
- "name": "support.type.js"
+ "name": "keyword.control.switch.js"
+ },
+ "2": {
+ "name": "meta.brace.round.js"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.js"
}
},
- "match": "(?:\\b([a-zA-Z_$][\\w$]*)\\b)",
- "name": "meta.object.heritage.parent.js"
- },
- "object-member": {
- "begin": "[a-zA-Z_$][\\w$]*\\s*:",
- "end": "(?=,|\\})",
- "name": "meta.object.member.js",
"patterns": [
{
"include": "#expression"
}
]
},
- "object-name": {
- "captures": {
+ "switch-block": {
+ "name": "switch-block.expr.js",
+ "begin": "\\{",
+ "beginCaptures": {
"0": {
- "name": "entity.name.class.js"
+ "name": "punctuation.definition.block.js"
}
},
- "match": "[a-zA-Z_$][\\w$]*",
- "name": "meta.object.name.js"
- },
- "parameter-name": {
- "captures": {
- "1": {
- "name": "storage.modifier.js"
- },
- "2": {
- "name": "keyword.others.js"
- },
- "3": {
- "name": "variable.parameter.js"
+ "end": "(?=\\})",
+ "patterns": [
+ {
+ "include": "#case-clause"
},
- "4": {
- "name": "keyword.others.js"
+ {
+ "include": "#statements"
}
- },
- "match": "(?:\\s*\\b(public|private|protected)\\b\\s+)?(\\.\\.\\.)?\\s*([a-zA-Z_$][\\w$]*)\\s*(\\??)",
- "name": "parameter.name.js"
+ ]
},
- "paren-expression": {
- "begin": "\\(",
+ "case-clause": {
+ "name": "case-clause.expr.js",
+ "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.paren.js"
+ "1": {
+ "name": "keyword.control.switch.js"
}
},
- "end": "\\)",
+ "end": ":",
"endCaptures": {
"0": {
- "name": "meta.brace.paren.js"
+ "name": "punctuation.definition.section.case-statement.js"
}
},
"patterns": [
@@ -1048,479 +2224,2015 @@
}
]
},
- "property-accessor": {
- "match": "\\b(get|set)\\b",
- "name": "storage.type.property.js"
+ "switch-statement": {
+ "name": "switch-statement.expr.js",
+ "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#switch-expression"
+ },
+ {
+ "include": "#switch-block"
+ }
+ ]
},
- "qstring-double": {
- "begin": "\"",
- "end": "\"|(?:[^\\\\\\n]$)",
- "name": "string.double.js",
+ "support-objects": {
"patterns": [
{
- "include": "#string-character-escape"
+ "name": "variable.language.arguments.js",
+ "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
+ },
+ {
+ "name": "support.class.builtin.js",
+ "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
+ },
+ {
+ "name": "support.class.error.js",
+ "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
+ },
+ {
+ "name": "support.function.js",
+ "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\() "
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.constant.math.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ },
+ "3": {
+ "name": "support.function.math.js"
+ },
+ "4": {
+ "name": "support.constant.property.math.js"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.class.console.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ },
+ "3": {
+ "name": "support.function.console.js"
+ }
+ }
+ },
+ {
+ "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.constant.json.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ },
+ "3": {
+ "name": "support.function.json.js"
+ }
+ }
+ },
+ {
+ "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "support.variable.property.js"
+ },
+ "3": {
+ "name": "support.constant.js"
+ }
+ }
+ },
+ {
+ "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.variable.dom.js"
+ },
+ "2": {
+ "name": "support.class.dom.js"
+ }
+ }
+ },
+ {
+ "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "support.constant.dom.js"
+ },
+ "3": {
+ "name": "support.variable.property.dom.js"
+ }
+ }
+ },
+ {
+ "name": "support.class.node.js",
+ "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.variable.object.process.js"
+ },
+ "2": {
+ "name": "punctuation.accessor.js"
+ },
+ "3": {
+ "name": "support.variable.property.process.js"
+ },
+ "4": {
+ "name": "support.function.process.js"
+ }
+ }
+ },
+ {
+ "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.type.object.module.js"
+ },
+ "2": {
+ "name": "support.type.object.module.js"
+ },
+ "3": {
+ "name": "punctuation.accessor.js"
+ },
+ "4": {
+ "name": "support.type.object.module.js"
+ }
+ }
+ },
+ {
+ "name": "support.variable.object.node.js",
+ "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
+ },
+ {
+ "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "support.function.event-handler.js"
+ },
+ "3": {
+ "name": "support.function.js"
+ },
+ "4": {
+ "name": "support.function.dom.js"
+ }
+ }
}
]
},
- "qstring-single": {
- "begin": "'",
- "end": "\\'|(?:[^\\\\\\n]$)",
- "name": "string.single.js",
+ "function-call": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
"patterns": [
{
- "include": "#string-character-escape"
+ "name": "meta.function-call.js",
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
+ "end": "(?=\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "patterns": [
+ {
+ "include": "#literal"
+ },
+ {
+ "include": "#support-objects"
+ },
+ {
+ "include": "#object-identifiers"
+ },
+ {
+ "include": "#punctuation-accessor"
+ },
+ {
+ "name": "entity.name.function.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ }
+ ]
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "name": "meta.type.parameters.js",
+ "begin": "\\<",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.typeparameters.begin.js"
+ }
+ },
+ "end": "\\>",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.typeparameters.end.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ {
+ "include": "#paren-expression"
}
]
},
- "regex": {
- "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
- "end": "$|(/)[igm]*",
- "name": "string.regex.js",
+ "identifiers": {
"patterns": [
{
- "match": "\\\\.",
- "name": "constant.character.escape.js"
+ "include": "#object-identifiers"
+ },
+ {
+ "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n))",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "entity.name.function.js"
+ }
+ }
+ },
+ {
+ "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "variable.other.constant.property.js"
+ }
+ }
+ },
+ {
+ "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "variable.other.property.js"
+ }
+ }
+ },
+ {
+ "name": "variable.other.constant.js",
+ "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
},
{
- "match": "\\[(\\\\\\]|[^\\]])*\\]",
- "name": "constant.character.class.js"
+ "name": "variable.other.readwrite.js",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
}
]
},
- "relational-operator": {
- "match": "===|!==|==|!=|<=|>=|<>|=|<|>",
- "name": "keyword.operator.comparison.js"
+ "object-identifiers": {
+ "patterns": [
+ {
+ "name": "support.class.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
+ },
+ {
+ "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.js"
+ },
+ "2": {
+ "name": "variable.other.constant.object.property.js"
+ },
+ "3": {
+ "name": "variable.other.object.property.js"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "variable.other.constant.object.js"
+ },
+ "2": {
+ "name": "variable.other.object.js"
+ }
+ }
+ }
+ ]
},
- "return-type": {
- "begin": "(?<=\\))\\s*:",
- "end": "(?=$)|(?=\\{|;|//)",
- "name": "meta.return.type.js",
+ "cast": {
"patterns": [
{
- "include": "#type"
+ "include": "#jsx"
}
]
},
- "static-modifier": {
- "match": "\\b(static)\\b",
- "name": "keyword.other.js"
+ "new-expr": {
+ "name": "new.expr.js",
+ "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$|\\.)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.new.js"
+ }
+ },
+ "end": "(?<=\\))|(?=[;),}]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$|\\.))|((?<!\\.|\\$)\\bfunction((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
+ "patterns": [
+ {
+ "include": "#paren-expression"
+ },
+ {
+ "include": "#class-or-interface-declaration"
+ },
+ {
+ "include": "#type"
+ }
+ ]
},
- "storage-keyword": {
- "match": "\\b(var|let|function|const|module|namespace|void|export)\\b",
- "name": "storage.type.js"
+ "object-member": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#object-literal-method-declaration"
+ },
+ {
+ "name": "meta.object.member.js",
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "name": "meta.object-literal.key.js",
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
+ "end": ":",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.separator.key-value.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ }
+ ]
+ },
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.js",
+ "begin": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(:)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.js"
+ },
+ "1": {
+ "name": "constant.numeric.decimal.js"
+ },
+ "2": {
+ "name": "punctuation.separator.key-value.js"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.js",
+ "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n)))",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.js"
+ },
+ "1": {
+ "name": "entity.name.function.js"
+ },
+ "2": {
+ "name": "punctuation.separator.key-value.js"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.js",
+ "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.js"
+ },
+ "1": {
+ "name": "punctuation.separator.key-value.js"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.js",
+ "begin": "\\.\\.\\.",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.spread.js"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.js",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
+ "captures": {
+ "1": {
+ "name": "variable.other.readwrite.js"
+ }
+ }
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
},
- "string": {
- "name": "string.js",
+ "expression-operators": {
"patterns": [
{
- "include": "#qstring-single"
+ "name": "keyword.control.flow.js",
+ "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$|\\.)"
},
{
- "include": "#qstring-double"
+ "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$|\\.)(?:\\s*(\\*))?",
+ "captures": {
+ "1": {
+ "name": "keyword.control.flow.js"
+ },
+ "2": {
+ "name": "keyword.generator.asterisk.js"
+ }
+ }
+ },
+ {
+ "name": "keyword.operator.expression.delete.js",
+ "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.in.js",
+ "match": "(?<!\\.|\\$)\\bin\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.of.js",
+ "match": "(?<!\\.|\\$)\\bof\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.instanceof.js",
+ "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.new.js",
+ "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$|\\.)"
+ },
+ {
+ "include": "#typeof-operator"
+ },
+ {
+ "name": "keyword.operator.expression.void.js",
+ "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$|\\.)"
+ },
+ {
+ "begin": "(?<!\\.|\\$)\\b(as)\\s+",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.as.js"
+ }
+ },
+ "end": "(?=$|^|[;,:})\\]])",
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "name": "keyword.operator.spread.js",
+ "match": "\\.\\.\\."
+ },
+ {
+ "name": "keyword.operator.assignment.compound.js",
+ "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
+ },
+ {
+ "name": "keyword.operator.assignment.compound.bitwise.js",
+ "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
+ },
+ {
+ "name": "keyword.operator.bitwise.shift.js",
+ "match": "<<|>>>|>>"
+ },
+ {
+ "name": "keyword.operator.comparison.js",
+ "match": "===|!==|==|!="
+ },
+ {
+ "name": "keyword.operator.relational.js",
+ "match": "<=|>=|<>|<|>"
+ },
+ {
+ "name": "keyword.operator.logical.js",
+ "match": "\\!|&&|\\|\\|"
+ },
+ {
+ "name": "keyword.operator.bitwise.js",
+ "match": "\\&|~|\\^|\\|"
+ },
+ {
+ "name": "keyword.operator.assignment.js",
+ "match": "\\="
+ },
+ {
+ "name": "keyword.operator.decrement.js",
+ "match": "--"
+ },
+ {
+ "name": "keyword.operator.increment.js",
+ "match": "\\+\\+"
+ },
+ {
+ "name": "keyword.operator.arithmetic.js",
+ "match": "%|\\*|/|-|\\+"
+ },
+ {
+ "match": "(?<=[_$[:alnum:])])\\s*(/)(?![/*])",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.arithmetic.js"
+ }
+ }
}
]
},
- "string-character-escape": {
- "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
- "name": "constant.character.escape"
+ "typeof-operator": {
+ "name": "keyword.operator.expression.typeof.js",
+ "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$|\\.)"
},
- "switch-block": {
- "begin": "{",
- "end": "(?=\\})",
- "name": "switch-block.expr.js",
+ "arrow-function": {
"patterns": [
{
- "include": "#expression"
+ "name": "meta.arrow.js",
+ "match": "(?:(?<!\\.|\\$)(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.async.js"
+ },
+ "2": {
+ "name": "variable.parameter.js"
+ }
+ }
+ },
+ {
+ "name": "meta.arrow.js",
+ "begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.async.js"
+ }
+ },
+ "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#arrow-return-type"
+ }
+ ]
+ },
+ {
+ "name": "meta.arrow.js",
+ "begin": "=>",
+ "beginCaptures": {
+ "0": {
+ "name": "storage.type.function.arrow.js"
+ }
+ },
+ "end": "(?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S))",
+ "patterns": [
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#expression"
+ }
+ ]
}
]
},
- "switch-expression": {
- "begin": "\\b(switch)\\b\\s*\\(",
+ "arrow-return-type": {
+ "name": "meta.return.type.arrow.js",
+ "begin": "(?<=\\))\\s*(:)",
"beginCaptures": {
"1": {
- "name": "keyword.control.js"
+ "name": "keyword.operator.type.annotation.js"
}
},
- "end": "\\)",
- "name": "switch-expression.expr.js",
+ "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
"patterns": [
{
- "include": "#expression"
- }
- ]
- },
- "switch-statement": {
- "begin": "(?=\\bswitch\\b\\s*\\()",
- "end": "}",
- "name": "switch-statement.expr.js",
- "patterns": [
+ "begin": "(?<=[:])(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
+ },
{
- "include": "#switch-expression"
+ "include": "#type-predicate-operator"
},
{
- "include": "#switch-block"
+ "include": "#type"
}
]
},
- "template": {
- "begin": "`",
+ "punctuation-comma": {
+ "name": "punctuation.separator.comma.js",
+ "match": ","
+ },
+ "punctuation-semicolon": {
+ "name": "punctuation.terminator.statement.js",
+ "match": ";"
+ },
+ "punctuation-accessor": {
+ "name": "punctuation.accessor.js",
+ "match": "\\."
+ },
+ "paren-expression": {
+ "begin": "\\(",
"beginCaptures": {
"0": {
- "name": "string.template.js"
+ "name": "meta.brace.round.js"
}
},
- "end": "`",
+ "end": "\\)",
"endCaptures": {
"0": {
- "name": "string.template.js"
+ "name": "meta.brace.round.js"
}
},
- "name": "meta.template.js",
"patterns": [
{
- "include": "#template-substitution-element"
+ "include": "#expression"
},
{
- "include": "#template-string-contents"
+ "include": "#punctuation-comma"
}
]
},
- "template-string-contents": {
- "begin": ".*?",
- "end": "(?=(\\$\\{|`))",
- "name": "string.template.js",
+ "qstring-double": {
+ "name": "string.quoted.double.js",
+ "begin": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.js"
+ }
+ },
+ "end": "(\")|((?:[^\\\\\\n])$)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.js"
+ },
+ "2": {
+ "name": "invalid.illegal.newline.js"
+ }
+ },
"patterns": [
{
"include": "#string-character-escape"
}
]
},
- "template-substitution-element": {
- "begin": "\\$\\{",
+ "qstring-single": {
+ "name": "string.quoted.single.js",
+ "begin": "'",
"beginCaptures": {
"0": {
- "name": "keyword.others.js"
+ "name": "punctuation.definition.string.begin.js"
}
},
- "end": "\\}",
+ "end": "(\\')|((?:[^\\\\\\n])$)",
"endCaptures": {
- "0": {
- "name": "keyword.others.js"
+ "1": {
+ "name": "punctuation.definition.string.end.js"
+ },
+ "2": {
+ "name": "invalid.illegal.newline.js"
}
},
- "name": "template.element.js",
"patterns": [
{
- "include": "#expression"
+ "include": "#string-character-escape"
}
]
},
- "ternary-expression": {
- "begin": "(?=\\?)",
- "end": "(?=$|[;,])",
+ "regex": {
"patterns": [
{
- "include": "#ternary-operator"
+ "name": "string.regexp.js",
+ "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.begin.js"
+ }
+ },
+ "end": "(/)([gimuy]*)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.js"
+ },
+ "2": {
+ "name": "keyword.other.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
},
{
- "include": "#expression-type"
- }
- ]
- },
- "ternary-operator": {
- "begin": "(\\?)",
- "end": "(:)",
- "patterns": [
- {
- "include": "#expression-type"
+ "name": "string.regexp.js",
+ "begin": "(?<![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.js"
+ }
+ },
+ "end": "(/)([gimuy]*)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.js"
+ },
+ "2": {
+ "name": "keyword.other.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
}
]
},
- "this-literal": {
- "match": "\\b(this)\\b",
- "name": "constant.language.this.js"
- },
- "type": {
- "name": "meta.type.js",
+ "regexp": {
"patterns": [
{
- "include": "#type-primitive"
+ "name": "keyword.control.anchor.regexp",
+ "match": "\\\\[bB]|\\^|\\$"
},
{
- "include": "#type-parameters"
+ "name": "keyword.other.back-reference.regexp",
+ "match": "\\\\[1-9]\\d*"
},
{
- "include": "#type-tuple"
+ "name": "keyword.operator.quantifier.regexp",
+ "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
},
{
- "include": "#type-object"
+ "name": "keyword.operator.or.regexp",
+ "match": "\\|"
},
{
- "include": "#type-operator"
+ "name": "meta.group.assertion.regexp",
+ "begin": "(\\()((\\?=)|(\\?!))",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.group.regexp"
+ },
+ "2": {
+ "name": "punctuation.definition.group.assertion.regexp"
+ },
+ "3": {
+ "name": "meta.assertion.look-ahead.regexp"
+ },
+ "4": {
+ "name": "meta.assertion.negative-look-ahead.regexp"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.group.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
},
{
- "include": "#type-paren-or-function-type-parameters"
+ "name": "meta.group.regexp",
+ "begin": "\\((\\?:)?",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.group.regexp"
+ },
+ "1": {
+ "name": "punctuation.definition.group.capture.regexp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.group.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
},
{
- "include": "#type-function-return-type"
+ "name": "constant.other.character-class.set.regexp",
+ "begin": "(\\[)(\\^)?",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.character-class.regexp"
+ },
+ "2": {
+ "name": "keyword.operator.negation.regexp"
+ }
+ },
+ "end": "(\\])",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.character-class.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "constant.other.character-class.range.regexp",
+ "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
+ "captures": {
+ "1": {
+ "name": "constant.character.numeric.regexp"
+ },
+ "2": {
+ "name": "constant.character.control.regexp"
+ },
+ "3": {
+ "name": "constant.character.escape.backslash.regexp"
+ },
+ "4": {
+ "name": "constant.character.numeric.regexp"
+ },
+ "5": {
+ "name": "constant.character.control.regexp"
+ },
+ "6": {
+ "name": "constant.character.escape.backslash.regexp"
+ }
+ }
+ },
+ {
+ "include": "#regex-character-class"
+ }
+ ]
},
{
- "include": "#type-name"
+ "include": "#regex-character-class"
}
]
},
- "type-annotation": {
- "begin": ":",
- "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[a-zA-Z_$])\\s*(?=\\{)",
- "name": "meta.type.annotation.js",
+ "regex-character-class": {
"patterns": [
{
- "include": "#expression-operator"
+ "name": "constant.other.character-class.regexp",
+ "match": "\\\\[wWsSdDtrnvf]|\\."
},
{
- "include": "#type"
+ "name": "constant.character.numeric.regexp",
+ "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
},
{
- "include": "#string"
+ "name": "constant.character.control.regexp",
+ "match": "\\\\c[A-Z]"
},
{
- "include": "#comment"
+ "name": "constant.character.escape.backslash.regexp",
+ "match": "\\\\."
}
]
},
- "type-declaration": {
- "begin": "\\b(type)\\b\\s+([a-zA-Z_$][\\w$]*)\\s*",
+ "string": {
+ "patterns": [
+ {
+ "include": "#qstring-single"
+ },
+ {
+ "include": "#qstring-double"
+ }
+ ]
+ },
+ "template": {
+ "name": "string.template.js",
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
"beginCaptures": {
"1": {
- "name": "keyword.other.js"
+ "name": "entity.name.function.tagged-template.js"
},
"2": {
- "name": "entity.name.class.js"
+ "name": "punctuation.definition.string.template.begin.js"
+ }
+ },
+ "end": "`",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.template.end.js"
}
},
- "end": "(?=$|[,);>]|var|type|function|class|interface)",
- "name": "meta.type.declaration.js",
"patterns": [
{
- "include": "#type-parameters"
- },
- {
- "include": "#type"
+ "include": "#template-substitution-element"
},
{
- "match": "=\\s*",
- "name": "keyword.operator.comparison.js"
+ "include": "#string-character-escape"
}
]
},
- "type-function-return-type": {
- "begin": "=>",
+ "string-character-escape": {
+ "name": "constant.character.escape.js",
+ "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
+ },
+ "template-substitution-element": {
+ "name": "meta.template.expression.js",
+ "begin": "\\$\\{",
"beginCaptures": {
"0": {
- "name": "keyword.operator.js"
+ "name": "punctuation.definition.template-expression.begin.js"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.template-expression.end.js"
}
},
- "end": "(?=\\s*[,\\)\\{=;>]|//|$)",
- "name": "meta.type.function.return.js",
"patterns": [
{
- "include": "#type"
+ "include": "#expression"
}
]
},
- "type-name": {
- "captures": {
- "1": {
- "name": "entity.name.type.js"
+ "literal": {
+ "patterns": [
+ {
+ "include": "#numeric-literal"
+ },
+ {
+ "include": "#boolean-literal"
+ },
+ {
+ "include": "#null-literal"
+ },
+ {
+ "include": "#undefined-literal"
+ },
+ {
+ "include": "#numericConstant-literal"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#this-literal"
+ },
+ {
+ "include": "#super-literal"
}
- },
- "match": "[a-zA-Z_$][.\\w$]*",
- "name": "meta.type.name.js"
+ ]
},
- "type-object": {
- "begin": "\\{",
+ "array-literal": {
+ "name": "meta.array.literal.js",
+ "begin": "\\[",
"beginCaptures": {
"0": {
- "name": "meta.brace.curly.js"
+ "name": "meta.brace.square.js"
}
},
- "end": "\\}",
+ "end": "\\]",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.js"
+ "name": "meta.brace.square.js"
}
},
- "name": "meta.object.type.js",
"patterns": [
{
- "include": "#comment"
+ "include": "#expression"
},
{
- "include": "#field-declaration"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "numeric-literal": {
+ "patterns": [
+ {
+ "name": "constant.numeric.hex.js",
+ "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
},
{
- "include": "#method-declaration"
+ "name": "constant.numeric.binary.js",
+ "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
},
{
- "include": "#indexer-declaration"
+ "name": "constant.numeric.octal.js",
+ "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
},
{
- "include": "#type-annotation"
+ "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
+ "captures": {
+ "0": {
+ "name": "constant.numeric.decimal.js"
+ },
+ "1": {
+ "name": "meta.delimiter.decimal.period.js"
+ },
+ "2": {
+ "name": "meta.delimiter.decimal.period.js"
+ },
+ "3": {
+ "name": "meta.delimiter.decimal.period.js"
+ },
+ "4": {
+ "name": "meta.delimiter.decimal.period.js"
+ },
+ "5": {
+ "name": "meta.delimiter.decimal.period.js"
+ },
+ "6": {
+ "name": "meta.delimiter.decimal.period.js"
+ }
+ }
}
]
},
- "type-operator": {
- "match": "[.|]",
- "name": "keyword.operator.type.js"
- },
- "type-parameters": {
- "begin": "DO_NOT_MATCH",
- "beginCaptures": {
- "1": {
- "name": "entity.name.type.js"
+ "boolean-literal": {
+ "patterns": [
+ {
+ "name": "constant.language.boolean.true.js",
+ "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
},
- "2": {
- "name": "meta.brace.angle.js"
+ {
+ "name": "constant.language.boolean.false.js",
+ "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
}
- },
- "end": "(?=$)|(>)",
- "endCaptures": {
- "2": {
- "name": "meta.brace.angle.js"
+ ]
+ },
+ "null-literal": {
+ "name": "constant.language.null.js",
+ "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
+ },
+ "this-literal": {
+ "name": "variable.language.this.js",
+ "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
+ },
+ "super-literal": {
+ "name": "variable.language.super.js",
+ "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
+ },
+ "undefined-literal": {
+ "name": "constant.language.undefined.js",
+ "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
+ },
+ "numericConstant-literal": {
+ "patterns": [
+ {
+ "name": "constant.language.nan.js",
+ "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
+ },
+ {
+ "name": "constant.language.infinity.js",
+ "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
}
- },
- "name": "meta.type.parameters.js",
+ ]
+ },
+ "access-modifier": {
+ "name": "storage.modifier.js",
+ "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$|\\.)"
+ },
+ "property-accessor": {
+ "name": "storage.type.property.js",
+ "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$|\\.)"
+ },
+ "comment": {
"patterns": [
{
- "match": "\\b(extends)\\b",
- "name": "keyword.other.js"
+ "name": "comment.block.documentation.js",
+ "begin": "/\\*\\*(?!/)",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.js"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#docblock"
+ }
+ ]
},
{
- "include": "#comment"
+ "name": "comment.block.js",
+ "begin": "/\\*",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.js"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.js"
+ }
+ }
},
{
- "include": "#type"
+ "begin": "(^[ \\t]+)?(//)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.leading.js"
+ },
+ "2": {
+ "name": "comment.line.double-slash.js punctuation.definition.comment.js"
+ }
+ },
+ "end": "(?=^)",
+ "contentName": "comment.line.double-slash.tsx"
}
]
},
- "type-paren-or-function-type-parameters": {
- "begin": "(?:\\b(new)\\b)?\\s*\\(",
+ "directives": {
+ "name": "comment.line.triple-slash.directive.js",
+ "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
"beginCaptures": {
"1": {
- "name": "keyword.control.js"
+ "name": "punctuation.definition.comment.js"
}
},
- "end": "\\)",
- "name": "meta.type.paren.cover.js",
+ "end": "(?=^)",
"patterns": [
{
- "include": "#comment"
+ "name": "meta.tag.js",
+ "begin": "(<)(reference|amd-dependency|amd-module)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.directive.js"
+ },
+ "2": {
+ "name": "entity.name.tag.directive.js"
+ }
+ },
+ "end": "/>",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.tag.directive.js"
+ }
+ },
+ "patterns": [
+ {
+ "name": "entity.other.attribute-name.directive.js",
+ "match": "path|types|no-default-lib|name"
+ },
+ {
+ "name": "keyword.operator.assignment.js",
+ "match": "="
+ },
+ {
+ "include": "#string"
+ }
+ ]
+ }
+ ]
+ },
+ "docblock": {
+ "patterns": [
+ {
+ "match": "(?x)\n((@)access)\n\\s+\n(private|protected|public)\n\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "constant.language.access-type.jsdoc"
+ }
+ }
},
{
- "include": "#type"
+ "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "5": {
+ "name": "constant.other.email.link.underline.jsdoc"
+ },
+ "6": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "4": {
+ "name": "keyword.operator.control.jsdoc"
+ },
+ "5": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "meta.example.jsdoc",
+ "begin": "((@)example)\\s+",
+ "end": "(?=@|\\*/)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "^\\s\\*\\s+"
+ },
+ {
+ "contentName": "constant.other.description.jsdoc",
+ "begin": "\\G(<)caption(>)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.tag.inline.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ },
+ "end": "(</)caption(>)|(?=\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "entity.name.tag.inline.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "[^\\s@*](?:[^*]|\\*[^/])*",
+ "captures": {
+ "0": {
+ "name": "source.embedded.js"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "constant.language.symbol-type.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!https?://)\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.link.underline.jsdoc"
+ },
+ "4": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(?:\n ([A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]*) # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* (,) \\s*\n ([A-Za-z_$]\n [\\w$.\\[\\]]*)\n )*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.delimiter.object.comma.jsdoc"
+ },
+ "5": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "begin": "((@)typedef)\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ },
+ {
+ "name": "entity.name.type.instance.jsdoc",
+ "match": "(?:[^@\\s*/]|\\*[^/])+"
+ }
+ ]
+ },
+ {
+ "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ },
+ {
+ "name": "variable.other.jsdoc",
+ "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
+ },
+ {
+ "name": "variable.other.jsdoc",
+ "begin": "\\[",
+ "end": "\\]|(?=\\*/)",
+ "patterns": [
+ {
+ "match": "(=)((?:[^\\]*]|\\*[^/])*)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.assignment.jsdoc"
+ },
+ "2": {
+ "name": "source.embedded.js"
+ }
+ }
+ },
+ {
+ "include": "#brackets"
+ },
+ {
+ "include": "#quotes"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "begin": "((@)(?:define|enum|exception|implements|modifies|namespace|private|protected|returns?|suppress|throws|type))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ }
+ ]
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "contentName": "variable.other.jsdoc",
+ "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.string.begin.jsdoc"
+ }
+ },
+ "end": "(\\3)|(?=$|\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "variable.other.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.string.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "storage.type.class.jsdoc",
+ "match": "(?x) (@) (?:abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|kind |lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace |noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve|private|prop |property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule |summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce) \\b",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ }
},
{
- "include": "#function-type-parameters"
+ "include": "#inline-tags"
}
]
},
- "type-primitive": {
+ "brackets": {
+ "patterns": [
+ {
+ "begin": "{",
+ "end": "}|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ },
+ {
+ "begin": "\\[",
+ "end": "\\]|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ },
+ "inline-tags": {
+ "patterns": [
+ {
+ "name": "constant.other.description.jsdoc",
+ "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.bracket.square.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.square.end.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "entity.name.type.instance.jsdoc",
+ "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.jsdoc"
+ },
+ "2": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "3": {
+ "name": "punctuation.definition.inline.tag.jsdoc"
+ }
+ },
+ "end": "}|(?=\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.bracket.curly.end.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
+ "captures": {
+ "1": {
+ "name": "variable.other.link.underline.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.separator.pipe.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
+ "captures": {
+ "1": {
+ "name": "variable.other.description.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.separator.pipe.jsdoc"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "quotes": {
+ "patterns": [
+ {
+ "begin": "'",
+ "end": "'|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#quotes"
+ }
+ ]
+ },
+ {
+ "begin": "\"",
+ "end": "\"|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#quotes"
+ }
+ ]
+ }
+ ]
+ },
+ "jsdoctype": {
+ "patterns": [
+ {
+ "name": "invalid.illegal.type.jsdoc",
+ "match": "\\G{(?:[^}*]|\\*[^/}])+$"
+ },
+ {
+ "contentName": "entity.name.type.instance.jsdoc",
+ "begin": "\\G({)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.jsdoc"
+ }
+ },
+ "end": "((}))\\s*|(?=\\*/)",
+ "endCaptures": {
+ "1": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.curly.end.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ },
+ "jsx-tag-attributes": {
+ "patterns": [
+ {
+ "include": "#jsx-tag-attribute-name"
+ },
+ {
+ "include": "#jsx-tag-attribute-assignment"
+ },
+ {
+ "include": "#jsx-string-double-quoted"
+ },
+ {
+ "include": "#jsx-string-single-quoted"
+ },
+ {
+ "include": "#jsx-evaluated-code"
+ }
+ ]
+ },
+ "jsx-tag-attribute-name": {
+ "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
"captures": {
"1": {
- "name": "support.type.js"
+ "name": "entity.other.attribute-name.js"
+ }
+ }
+ },
+ "jsx-tag-attribute-assignment": {
+ "name": "keyword.operator.assignment.js",
+ "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
+ },
+ "jsx-string-double-quoted": {
+ "name": "string.quoted.double.js",
+ "begin": "\"",
+ "end": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.js"
+ }
+ },
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.js"
}
},
- "match": "\\b(string|number|boolean|symbol|any|void)\\b",
- "name": "meta.type.primitive.js"
+ "patterns": [
+ {
+ "include": "#jsx-entities"
+ }
+ ]
},
- "type-tuple": {
- "begin": "\\[",
+ "jsx-string-single-quoted": {
+ "name": "string.quoted.single.js",
+ "begin": "'",
+ "end": "'",
"beginCaptures": {
"0": {
- "name": "meta.brace.square.js"
+ "name": "punctuation.definition.string.begin.js"
}
},
- "end": "\\]",
"endCaptures": {
"0": {
- "name": "meta.brace.square.js"
+ "name": "punctuation.definition.string.end.js"
}
},
- "name": "meta.type.tuple.js",
"patterns": [
{
- "include": "#type"
+ "include": "#jsx-entities"
+ }
+ ]
+ },
+ "jsx-entities": {
+ "patterns": [
+ {
+ "name": "constant.character.entity.js",
+ "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.entity.js"
+ },
+ "3": {
+ "name": "punctuation.definition.entity.js"
+ }
+ }
},
{
- "include": "#comment"
+ "name": "invalid.illegal.bad-ampersand.js",
+ "match": "&"
}
]
},
- "undefined-literal": {
- "match": "\\b(undefined)\\b",
- "name": "constant.language.js"
+ "jsx-evaluated-code": {
+ "name": "meta.embedded.expression.js",
+ "begin": "\\{",
+ "end": "\\}",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.embedded.begin.js"
+ }
+ },
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.embedded.end.js"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
},
- "var-expr": {
- "begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\b",
+ "jsx-tag-attributes-illegal": {
+ "name": "invalid.illegal.attribute.js",
+ "match": "\\S+"
+ },
+ "jsx-tag-without-attributes": {
+ "name": "meta.tag.without-attributes.js",
+ "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
+ "end": "(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
"beginCaptures": {
"1": {
- "name": "storage.type.js"
+ "name": "punctuation.definition.tag.begin.js"
+ },
+ "2": {
+ "name": "entity.name.tag.js"
+ },
+ "3": {
+ "name": "support.class.component.js"
+ },
+ "4": {
+ "name": "punctuation.definition.tag.end.js"
}
},
- "end": "(?=$|;)",
- "name": "meta.var.expr.js",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.js"
+ },
+ "2": {
+ "name": "entity.name.tag.js"
+ },
+ "3": {
+ "name": "support.class.component.js"
+ },
+ "4": {
+ "name": "punctuation.definition.tag.end.js"
+ }
+ },
+ "contentName": "meta.jsx.children.tsx",
"patterns": [
{
- "include": "#var-single-variable"
+ "include": "#jsx-children"
+ }
+ ]
+ },
+ "jsx-tag-in-expression": {
+ "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
+ "end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.js"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.end.js"
+ },
+ "2": {
+ "name": "punctuation.definition.tag.begin.js"
+ },
+ "3": {
+ "name": "entity.name.tag.js"
+ },
+ "4": {
+ "name": "support.class.component.js"
},
+ "5": {
+ "name": "punctuation.definition.tag.end.js"
+ }
+ },
+ "patterns": [
{
- "include": "#comment"
+ "include": "#jsx-tag"
}
]
},
- "var-single-variable": {
- "begin": "\\b([a-zA-Z_$][\\w$]*)\\s*(=?)",
- "beginCaptures": {
+ "jsx-child-tag": {
+ "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
+ "end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.js"
+ },
"1": {
- "name": "variable.js"
+ "name": "punctuation.definition.tag.end.js"
+ },
+ "2": {
+ "name": "punctuation.definition.tag.begin.js"
+ },
+ "3": {
+ "name": "entity.name.tag.js"
+ },
+ "4": {
+ "name": "support.class.component.js"
+ },
+ "5": {
+ "name": "punctuation.definition.tag.end.js"
}
},
- "end": "(?=$|[;,])",
- "name": "meta.var-single-variable.expr.js",
"patterns": [
{
- "include": "#ternary-expression"
+ "include": "#jsx-tag"
+ }
+ ]
+ },
+ "jsx-tag": {
+ "name": "meta.tag.js",
+ "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
+ "end": "(?=(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)))",
+ "patterns": [
+ {
+ "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.js"
+ },
+ "2": {
+ "name": "entity.name.tag.js"
+ },
+ "3": {
+ "name": "support.class.component.js"
+ }
+ },
+ "end": "(?=[/]?>)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#jsx-tag-attributes"
+ },
+ {
+ "include": "#jsx-tag-attributes-illegal"
+ }
+ ]
},
{
- "include": "#type-annotation"
+ "begin": "(>)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.js"
+ }
+ },
+ "end": "(?=</)",
+ "contentName": "meta.jsx.children.tsx",
+ "patterns": [
+ {
+ "include": "#jsx-children"
+ }
+ ]
+ }
+ ]
+ },
+ "jsx-tag-invalid": {
+ "name": "invalid.illegal.tag.incomplete.js",
+ "match": "<\\s*>"
+ },
+ "jsx-children": {
+ "patterns": [
+ {
+ "include": "#jsx-tag-without-attributes"
},
{
- "include": "#string"
+ "include": "#jsx-child-tag"
},
{
- "include": "#comment"
+ "include": "#jsx-tag-invalid"
},
{
- "include": "#expression"
+ "include": "#jsx-evaluated-code"
+ },
+ {
+ "include": "#jsx-entities"
}
]
},
- "variable-initializer": {
- "begin": "(=)",
- "beginCaptures": {
- "1": {
- "name": "keyword.operator.comparison.js"
- }
- },
- "end": "(?=$|[,);=])",
+ "jsx": {
"patterns": [
{
- "include": "#expression"
+ "include": "#jsx-tag-without-attributes"
+ },
+ {
+ "include": "#jsx-tag-in-expression"
+ },
+ {
+ "include": "#jsx-tag-invalid"
}
]
}
- },
- "scopeName": "source.js",
- "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
- "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/55b86614037e8c754c0657b0cd03f4f90c9498db"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/tsconfig.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/tsconfig.json
index 8cb1633437..4445bb27fd 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/tsconfig.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/javascript/tsconfig.json
@@ -1,11 +1,13 @@
{
"compilerOptions": {
- "noLib": true,
"target": "es5",
"module": "commonjs",
- "outDir": "./out"
+ "outDir": "./out",
+ "lib": [
+ "es2015"
+ ]
},
- "exclude": [
- "node_modules"
+ "include": [
+ "src/**/*"
]
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/OSSREADME.json
index c2c5f43cb8..5dfffd1707 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/OSSREADME.json
@@ -1,7 +1,7 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
"name": "Benvie/JavaScriptNext.tmLanguage",
+ "version": "0.0.0",
"license": "MIT",
- "repositoryURL": "https://github.com/Benvie/JavaScriptNext.tmLanguage",
- "repositoryRevision": "8f0d074"
+ "repositoryURL": "https://github.com/Benvie/JavaScriptNext.tmLanguage"
}] \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/npm-shrinkwrap.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/npm-shrinkwrap.json
index c6f216d2d2..e9b9bf0a74 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/npm-shrinkwrap.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/npm-shrinkwrap.json
@@ -3,39 +3,39 @@
"version": "0.1.0",
"dependencies": {
"applicationinsights": {
- "version": "0.15.6",
- "from": "applicationinsights@0.15.6",
- "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.15.6.tgz"
+ "version": "0.18.0",
+ "from": "applicationinsights@0.18.0",
+ "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz"
},
"vscode-extension-telemetry": {
- "version": "0.0.5",
- "from": "vscode-extension-telemetry@>=0.0.5 <0.0.6",
- "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.5.tgz"
+ "version": "0.0.6",
+ "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7",
+ "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz"
},
"vscode-jsonrpc": {
- "version": "2.3.2-next.5",
- "from": "vscode-jsonrpc@>=2.3.2-next.2 <3.0.0",
- "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-2.3.2-next.5.tgz"
+ "version": "3.1.0-alpha.1",
+ "from": "vscode-jsonrpc@>=3.1.0-alpha.1 <4.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-3.1.0-alpha.1.tgz"
},
"vscode-languageclient": {
- "version": "2.4.2-next.22",
+ "version": "3.1.0-alpha.1",
"from": "vscode-languageclient@next",
- "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-2.4.2-next.22.tgz"
+ "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-3.1.0-alpha.1.tgz"
},
"vscode-languageserver-types": {
- "version": "1.0.3",
- "from": "vscode-languageserver-types@>=1.0.3 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-1.0.3.tgz"
+ "version": "3.0.3",
+ "from": "vscode-languageserver-types@>=3.0.3 <4.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.0.3.tgz"
},
"vscode-nls": {
- "version": "1.0.7",
- "from": "vscode-nls@latest",
- "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz"
+ "version": "2.0.2",
+ "from": "vscode-nls@>=2.0.2 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.2.tgz"
},
"winreg": {
- "version": "0.0.13",
- "from": "winreg@0.0.13",
- "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.13.tgz"
+ "version": "1.2.3",
+ "from": "winreg@1.2.3",
+ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz"
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/package.json
index b5603841c6..2e7f998417 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/package.json
@@ -61,44 +61,72 @@
"properties": {
"json.schemas": {
"type": "array",
- "description": "Associate schemas to JSON files in the current project",
+ "description": "%json.schemas.desc%",
"items": {
"type": "object",
"default": {
"fileMatch": [
- "{{/myfile}}"
+ "/myfile"
],
- "url": "{{schemaURL}}"
+ "url": "schemaURL"
},
"properties": {
"url": {
"type": "string",
"default": "/user.schema.json",
- "description": "A URL to a schema or a relative path to a schema in the current directory"
+ "description": "%json.schemas.url.desc%"
},
"fileMatch": {
"type": "array",
"items": {
"type": "string",
"default": "MyFile.json",
- "description": "A file pattern that can contain '*' to match against when resolving JSON files to schemas."
+ "description": "%json.schemas.fileMatch.item.desc%"
},
"minItems": 1,
- "description": "An array of file patterns to match against when resolving JSON files to schemas."
+ "description": "%json.schemas.fileMatch.desc%"
},
"schema": {
"$ref": "http://json-schema.org/draft-04/schema#",
- "description": "The schema definition for the given URL. The schema only needs to be provided to avoid accesses to the schema URL."
+ "description": "%json.schemas.schema.desc%"
}
}
}
+ },
+ "json.format.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%json.format.enable.desc%"
+ },
+ "json.trace.server": {
+ "type": "string",
+ "enum": [
+ "off",
+ "messages",
+ "verbose"
+ ],
+ "default": "off",
+ "description": "%json.tracing.desc%"
+ },
+ "json.colorDecorators.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%json.colorDecorators.enable.desc%"
}
}
+ },
+ "configurationDefaults": {
+ "[json]": {
+ "editor.quickSuggestions": { "strings": true }
+ }
}
},
"dependencies": {
- "vscode-extension-telemetry": "^0.0.5",
- "vscode-languageclient": "^2.4.2-next.22",
- "vscode-nls": "^1.0.7"
+ "vscode-extension-telemetry": "^0.0.7",
+ "vscode-languageclient": "^3.1.0-alpha.1",
+ "vscode-nls": "^2.0.2"
+ },
+ "devDependencies": {
+ "@types/node": "^6.0.51"
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/syntaxes/JSON.tmLanguage b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/syntaxes/JSON.tmLanguage
index 9d6a24cc16..507eb03ec9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/syntaxes/JSON.tmLanguage
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/json/syntaxes/JSON.tmLanguage
@@ -98,7 +98,7 @@
<array>
<dict>
<key>begin</key>
- <string>/\*\*</string>
+ <string>/\*\*(?!/)</string>
<key>captures</key>
<dict>
<key>0</key>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/OSSREADME.json
index e39917c2d2..d0dfbef7cb 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/OSSREADME.json
@@ -1,7 +1,7 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
- "name": "textmate/less.tmbundle",
+ "name": "language-less",
+ "version": "0.0.0",
"license": "MIT",
- "repositoryURL": "https://github.com/textmate/less.tmbundle",
- "repositoryRevision": "7ef97ad"
+ "repositoryURL": "https://github.com/atom/language-less"
}]
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/language-configuration.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/language-configuration.json
index 570a46c4c9..36a9cccd68 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/language-configuration.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/language-configuration.json
@@ -6,8 +6,7 @@
"brackets": [
["{", "}"],
["[", "]"],
- ["(", ")"],
- ["<", ">"]
+ ["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}", "notIn": ["string", "comment"] },
@@ -21,7 +20,6 @@
["[", "]"],
["(", ")"],
["\"", "\""],
- ["'", "'"],
- ["<", ">"]
+ ["'", "'"]
]
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/package.json
index e6b9fd6368..865edef01d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/less/package.json
@@ -3,6 +3,9 @@
"version": "0.1.0",
"publisher": "vscode",
"engines": { "vscode": "*" },
+ "scripts": {
+ "update-grammar": "node ../../build/npm/update-grammar.js atom/language-less grammars/less.cson ./syntaxes/less.tmLanguage.json"
+ },
"contributes": {
"languages": [{
"id": "less",
@@ -14,7 +17,7 @@
"grammars": [{
"language": "less",
"scopeName": "source.css.less",
- "path": "./syntaxes/LESS.tmLanguage"
+ "path": "./syntaxes/less.tmLanguage.json"
}]
}
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/package.json
index 4983d3a28f..b6d814afd5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/package.json
@@ -7,9 +7,11 @@
"update-grammar": "node ../../build/npm/update-grammar.js textmate/make.tmbundle Syntaxes/Makefile.plist ./syntaxes/Makefile.json"
},
"contributes": {
+
"languages": [{
"id": "makefile",
"aliases": ["Makefile", "makefile"],
+ "extensions": [ ".mk" ],
"filenames": [ "Makefile", "makefile", "GNUmakefile", "OCamlMakefile" ],
"configuration": "./language-configuration.json"
}],
@@ -17,6 +19,11 @@
"language": "makefile",
"scopeName": "source.makefile",
"path": "./syntaxes/Makefile.json"
- }]
+ }],
+ "configurationDefaults": {
+ "[makefile]": {
+ "editor.insertSpaces": false
+ }
+ }
}
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/syntaxes/Makefile.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/syntaxes/Makefile.json
index 2264321c9c..1562efc5c1 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/syntaxes/Makefile.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/make/syntaxes/Makefile.json
@@ -1,4 +1,9 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/textmate/make.tmbundle/blob/master/Syntaxes/Makefile.plist",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"fileTypes": [
"Makefile",
"makefile",
@@ -470,6 +475,5 @@
}
},
"scopeName": "source.makefile",
- "uuid": "FF1825E8-6B1C-11D9-B883-000D93589AF6",
- "version": "https://github.com/textmate/make.tmbundle/commit/1a1827da81e20fdce56e2658451340c070ca44b7"
+ "uuid": "FF1825E8-6B1C-11D9-B883-000D93589AF6"
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/OSSREADME.json
index 253e6b5fd9..a67e4bcec9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/OSSREADME.json
@@ -1,22 +1,8 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[{
- "name": "textmate/objective-c.tmbundle",
+ "name": "atom/language-objective-c",
"version": "0.0.0",
- "license": "TextMate Bundle License",
- "repositoryURL": "https://github.com/textmate/objective-c.tmbundle",
- "licenseDetail": [
- "Copyright (c) textmate-objective-c.tmbundle project authors",
- "",
- "If not otherwise specified (see below), files in this repository fall under the following license:",
- "",
- "Permission to copy, use, modify, sell and distribute this",
- "software is granted. This software is provided \"as is\" without",
- "express or implied warranty, and with no claim as to its",
- "suitability for any purpose.",
- "",
- "An exception is made for files in readable text which contain their own license information,",
- "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added",
- "to the base-name name of the original file, and an extension of txt, html, or similar. For example",
- "\"tidy\" is accompanied by \"tidy-license.txt\"."
- ]
+ "license": "MIT",
+ "repositoryURL": "https://github.com/atom/language-objective-c",
+ "description": "The files syntaxes/objective-c.tmLanguage.json and syntaxes/objective-c++.tmLanguage.json were derived from the Atom package https://github.com/atom/language-objective-c which was originally converted from the TextMate bundle https://github.com/textmate/objective-c.tmbundle."
}]
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/package.json
index 0313bf2b9a..94795240f5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/objective-c/package.json
@@ -2,18 +2,46 @@
"name": "objective-c",
"version": "0.1.0",
"publisher": "vscode",
- "engines": { "vscode": "*" },
+ "engines": {
+ "vscode": "*"
+ },
+ "scripts": {
+ "update-grammar": "node ../../build/npm/update-grammar.js atom/language-objective-c grammars/objective-c.cson ./syntaxes/objective-c.tmLanguage.json && node ../../build/npm/update-grammar.js atom/language-objective-c grammars/objective-c++.cson ./syntaxes/objective-c++.tmLanguage.json"
+ },
"contributes": {
- "languages": [{
- "id": "objective-c",
- "extensions": [ ".m" ],
- "aliases": [ "Objective-C"],
- "configuration": "./language-configuration.json"
- }],
- "grammars": [{
- "language": "objective-c",
- "scopeName": "source.objc",
- "path": "./syntaxes/Objective-C.tmLanguage"
- }]
+ "languages": [
+ {
+ "id": "objective-c",
+ "extensions": [
+ ".m"
+ ],
+ "aliases": [
+ "Objective-C"
+ ],
+ "configuration": "./language-configuration.json"
+ },
+ {
+ "id": "objective-cpp",
+ "extensions": [
+ ".mm"
+ ],
+ "aliases": [
+ "Objective-C++"
+ ],
+ "configuration": "./language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "objective-c",
+ "scopeName": "source.objc",
+ "path": "./syntaxes/objective-c.tmLanguage.json"
+ },
+ {
+ "language": "objective-cpp",
+ "scopeName": "source.objcpp",
+ "path": "./syntaxes/objective-c++.tmLanguage.json"
+ }
+ ]
}
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/package.json
index 47b6c419c6..7448dd048a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/package.json
@@ -15,5 +15,8 @@
"scopeName": "source.powershell",
"path": "./syntaxes/PowershellSyntax.tmLanguage"
}]
+ },
+ "scripts": {
+ "update-grammar": "node ../../build/npm/update-grammar.js SublimeText/PowerShell Support/PowershellSyntax.tmLanguage ./syntaxes/powershell.tmLanguage.json"
}
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/syntaxes/PowershellSyntax.tmLanguage b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/syntaxes/PowershellSyntax.tmLanguage
index 36a16e35dc..f54cf896b5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/syntaxes/PowershellSyntax.tmLanguage
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/powershell/syntaxes/PowershellSyntax.tmLanguage
@@ -240,7 +240,7 @@
</dict>
<dict>
<key>match</key>
- <string>(?i:[a-z][a-z0-9]+-?[a-z][a-z0-9]+)(?i:\.(?i:exe|cmd|bat|ps1))</string>
+ <string>(\b(([A-Za-z0-9\-_\.]+)\.(?i:exe|com|cmd|bat))\b)</string>
<key>name</key>
<string>support.function.powershell</string>
</dict>
@@ -1183,4 +1183,4 @@
<key>uuid</key>
<string>f8f5ffb0-503e-11df-9879-0800200c9a66</string>
</dict>
-</plist> \ No newline at end of file
+</plist>
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/package.json
index 94b8ad1db0..e0ff83c749 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/package.json
@@ -10,7 +10,7 @@
"languages": [{
"id": "shellscript",
"aliases": ["Shell Script (Bash)", "shellscript", "bash", "sh", "zsh"],
- "extensions": [".sh", ".bash", ".bashrc", ".bash_aliases", ".bash_profile", ".bash_login", ".ebuild", ".install", ".profile", ".bash_logout", ".zsh", ".zshrc", ".zprofile", ".zlogin", ".zlogout", ".zshenv"],
+ "extensions": [".sh", ".bash", ".bashrc", ".bash_aliases", ".bash_profile", ".bash_login", ".ebuild", ".install", ".profile", ".bash_logout", ".zsh", ".zshrc", ".zprofile", ".zlogin", ".zlogout", ".zshenv", ".zsh-theme"],
"filenames": ["PKGBUILD"],
"firstLine": "^#!.*\\b(bash|zsh|sh|tcsh).*|^#\\s*-\\*-[^*]*mode:\\s*shell-script[^*]*-\\*-",
"configuration": "./language-configuration.json",
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json
index 0d4fbc322b..1ac065388d 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/shellscript/syntaxes/Shell-Unix-Bash.tmLanguage.json
@@ -1,4 +1,9 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/textmate/shellscript.tmbundle/blob/master/Syntaxes/Shell-Unix-Bash.tmLanguage",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"fileTypes": [
"sh",
"bash",
@@ -58,6 +63,9 @@
},
{
"include": "#support"
+ },
+ {
+ "include": "#lines"
}
],
"repository": {
@@ -221,7 +229,7 @@
"function-definition": {
"patterns": [
{
- "begin": "(?<=^|;|&|\\s)(function)\\s+([^\\s<>;'\"\\\\|$&()]+)(?:\\s*(\\(\\)))?",
+ "begin": "(?<=^|;|&)\\s*(function)\\s+([^\\s<>;'\"\\\\|$&()]+)(?:\\s*(\\(\\)))?",
"beginCaptures": {
"1": {
"name": "storage.type.function.shell"
@@ -233,7 +241,7 @@
"name": "punctuation.definition.arguments.shell"
}
},
- "end": ";|&|$",
+ "end": ";|&|\\n",
"endCaptures": {
"0": {
"name": "punctuation.definition.function.shell"
@@ -247,7 +255,7 @@
]
},
{
- "begin": "(?<=^|;|&|\\s)([^\\s<>;'\"\\\\|$&()]+)\\s*(\\(\\))",
+ "begin": "(?<=^|;|&)\\s*([^\\s<>;'\"\\\\|$&()]+)\\s*(\\(\\))",
"beginCaptures": {
"1": {
"name": "entity.name.function.shell"
@@ -256,7 +264,7 @@
"name": "punctuation.definition.arguments.shell"
}
},
- "end": ";|&|$",
+ "end": ";|&|\\n",
"endCaptures": {
"0": {
"name": "punctuation.definition.function.shell"
@@ -801,6 +809,14 @@
}
]
},
+ "lines": {
+ "patterns": [
+ {
+ "match": "\\\\\\n",
+ "name": "constant.character.escape.newline.shell"
+ }
+ ]
+ },
"list": {
"patterns": [
{
@@ -1226,6 +1242,5 @@
}
},
"scopeName": "source.shell",
- "uuid": "DDEEA3ED-6B1C-11D9-8B10-000D93589AF6",
- "version": "https://github.com/textmate/shellscript.tmbundle/commit/2677fdc83ed9d6a517d5d204e003f49141fc72e4"
+ "uuid": "DDEEA3ED-6B1C-11D9-8B10-000D93589AF6"
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/OSSREADME.json
index d95f457c5d..ec0394b3ad 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/OSSREADME.json
@@ -1,8 +1,261 @@
+// August 2015
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
+// THEY ARE CLEARED ONLY FOR LIMITED USE BY MONACO FOR THE MONACO PRODUCT.
+// DO NOT USE OR SHARE THIS CODE WITHOUT APPROVAL PURSUANT TO THE MICROSOFT OPEN SOURCE SOFTWARE APPROVAL POLICY.
+
[{
- "name": "Microsoft/TypeScript-TmLanguage",
- "license": "MIT",
+ "name": "TypeScript-TmLanguage",
+ "version": "0.1.8",
+ "license": "Apache2",
"repositoryURL": "https://github.com/Microsoft/TypeScript-TmLanguage",
- "repositoryRevision": "fea3b25",
- "description": "The file syntaxes/JavaScript.tmLanguage.json was derived from TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage."
+ "description": "The files syntaxes/TypeScript.tmLanguage.json and syntaxes/TypeScriptReact.tmLanguage.json were derived from TypeScript.tmLanguage and TypeScriptReact.tmLanguage in https://github.com/Microsoft/TypeScript-TmLanguage.",
+ "licenseDetail": [
+ // Reason: LICENSE file does not include Copyright statement
+ "Copyright (c) Microsoft Corporation. All rights reserved.",
+ "",
+ " Apache License",
+ " Version 2.0, January 2004",
+ " http://www.apache.org/licenses/",
+ "",
+ " TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION",
+ "",
+ " 1. Definitions.",
+ "",
+ " \"License\" shall mean the terms and conditions for use, reproduction,",
+ " and distribution as defined by Sections 1 through 9 of this document.",
+ "",
+ " \"Licensor\" shall mean the copyright owner or entity authorized by",
+ " the copyright owner that is granting the License.",
+ "",
+ " \"Legal Entity\" shall mean the union of the acting entity and all",
+ " other entities that control, are controlled by, or are under common",
+ " control with that entity. For the purposes of this definition,",
+ " \"control\" means (i) the power, direct or indirect, to cause the",
+ " direction or management of such entity, whether by contract or",
+ " otherwise, or (ii) ownership of fifty percent (50%) or more of the",
+ " outstanding shares, or (iii) beneficial ownership of such entity.",
+ "",
+ " \"You\" (or \"Your\") shall mean an individual or Legal Entity",
+ " exercising permissions granted by this License.",
+ "",
+ " \"Source\" form shall mean the preferred form for making modifications,",
+ " including but not limited to software source code, documentation",
+ " source, and configuration files.",
+ "",
+ " \"Object\" form shall mean any form resulting from mechanical",
+ " transformation or translation of a Source form, including but",
+ " not limited to compiled object code, generated documentation,",
+ " and conversions to other media types.",
+ "",
+ " \"Work\" shall mean the work of authorship, whether in Source or",
+ " Object form, made available under the License, as indicated by a",
+ " copyright notice that is included in or attached to the work",
+ " (an example is provided in the Appendix below).",
+ "",
+ " \"Derivative Works\" shall mean any work, whether in Source or Object",
+ " form, that is based on (or derived from) the Work and for which the",
+ " editorial revisions, annotations, elaborations, or other modifications",
+ " represent, as a whole, an original work of authorship. For the purposes",
+ " of this License, Derivative Works shall not include works that remain",
+ " separable from, or merely link (or bind by name) to the interfaces of,",
+ " the Work and Derivative Works thereof.",
+ "",
+ " \"Contribution\" shall mean any work of authorship, including",
+ " the original version of the Work and any modifications or additions",
+ " to that Work or Derivative Works thereof, that is intentionally",
+ " submitted to Licensor for inclusion in the Work by the copyright owner",
+ " or by an individual or Legal Entity authorized to submit on behalf of",
+ " the copyright owner. For the purposes of this definition, \"submitted\"",
+ " means any form of electronic, verbal, or written communication sent",
+ " to the Licensor or its representatives, including but not limited to",
+ " communication on electronic mailing lists, source code control systems,",
+ " and issue tracking systems that are managed by, or on behalf of, the",
+ " Licensor for the purpose of discussing and improving the Work, but",
+ " excluding communication that is conspicuously marked or otherwise",
+ " designated in writing by the copyright owner as \"Not a Contribution.\"",
+ "",
+ " \"Contributor\" shall mean Licensor and any individual or Legal Entity",
+ " on behalf of whom a Contribution has been received by Licensor and",
+ " subsequently incorporated within the Work.",
+ "",
+ " 2. Grant of Copyright License. Subject to the terms and conditions of",
+ " this License, each Contributor hereby grants to You a perpetual,",
+ " worldwide, non-exclusive, no-charge, royalty-free, irrevocable",
+ " copyright license to reproduce, prepare Derivative Works of,",
+ " publicly display, publicly perform, sublicense, and distribute the",
+ " Work and such Derivative Works in Source or Object form.",
+ "",
+ " 3. Grant of Patent License. Subject to the terms and conditions of",
+ " this License, each Contributor hereby grants to You a perpetual,",
+ " worldwide, non-exclusive, no-charge, royalty-free, irrevocable",
+ " (except as stated in this section) patent license to make, have made,",
+ " use, offer to sell, sell, import, and otherwise transfer the Work,",
+ " where such license applies only to those patent claims licensable",
+ " by such Contributor that are necessarily infringed by their",
+ " Contribution(s) alone or by combination of their Contribution(s)",
+ " with the Work to which such Contribution(s) was submitted. If You",
+ " institute patent litigation against any entity (including a",
+ " cross-claim or counterclaim in a lawsuit) alleging that the Work",
+ " or a Contribution incorporated within the Work constitutes direct",
+ " or contributory patent infringement, then any patent licenses",
+ " granted to You under this License for that Work shall terminate",
+ " as of the date such litigation is filed.",
+ "",
+ " 4. Redistribution. You may reproduce and distribute copies of the",
+ " Work or Derivative Works thereof in any medium, with or without",
+ " modifications, and in Source or Object form, provided that You",
+ " meet the following conditions:",
+ "",
+ " (a) You must give any other recipients of the Work or",
+ " Derivative Works a copy of this License; and",
+ "",
+ " (b) You must cause any modified files to carry prominent notices",
+ " stating that You changed the files; and",
+ "",
+ " (c) You must retain, in the Source form of any Derivative Works",
+ " that You distribute, all copyright, patent, trademark, and",
+ " attribution notices from the Source form of the Work,",
+ " excluding those notices that do not pertain to any part of",
+ " the Derivative Works; and",
+ "",
+ " (d) If the Work includes a \"NOTICE\" text file as part of its",
+ " distribution, then any Derivative Works that You distribute must",
+ " include a readable copy of the attribution notices contained",
+ " within such NOTICE file, excluding those notices that do not",
+ " pertain to any part of the Derivative Works, in at least one",
+ " of the following places: within a NOTICE text file distributed",
+ " as part of the Derivative Works; within the Source form or",
+ " documentation, if provided along with the Derivative Works; or,",
+ " within a display generated by the Derivative Works, if and",
+ " wherever such third-party notices normally appear. The contents",
+ " of the NOTICE file are for informational purposes only and",
+ " do not modify the License. You may add Your own attribution",
+ " notices within Derivative Works that You distribute, alongside",
+ " or as an addendum to the NOTICE text from the Work, provided",
+ " that such additional attribution notices cannot be construed",
+ " as modifying the License.",
+ "",
+ " You may add Your own copyright statement to Your modifications and",
+ " may provide additional or different license terms and conditions",
+ " for use, reproduction, or distribution of Your modifications, or",
+ " for any such Derivative Works as a whole, provided Your use,",
+ " reproduction, and distribution of the Work otherwise complies with",
+ " the conditions stated in this License.",
+ "",
+ " 5. Submission of Contributions. Unless You explicitly state otherwise,",
+ " any Contribution intentionally submitted for inclusion in the Work",
+ " by You to the Licensor shall be under the terms and conditions of",
+ " this License, without any additional terms or conditions.",
+ " Notwithstanding the above, nothing herein shall supersede or modify",
+ " the terms of any separate license agreement you may have executed",
+ " with Licensor regarding such Contributions.",
+ "",
+ " 6. Trademarks. This License does not grant permission to use the trade",
+ " names, trademarks, service marks, or product names of the Licensor,",
+ " except as required for reasonable and customary use in describing the",
+ " origin of the Work and reproducing the content of the NOTICE file.",
+ "",
+ " 7. Disclaimer of Warranty. Unless required by applicable law or",
+ " agreed to in writing, Licensor provides the Work (and each",
+ " Contributor provides its Contributions) on an \"AS IS\" BASIS,",
+ " WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or",
+ " implied, including, without limitation, any warranties or conditions",
+ " of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A",
+ " PARTICULAR PURPOSE. You are solely responsible for determining the",
+ " appropriateness of using or redistributing the Work and assume any",
+ " risks associated with Your exercise of permissions under this License.",
+ "",
+ " 8. Limitation of Liability. In no event and under no legal theory,",
+ " whether in tort (including negligence), contract, or otherwise,",
+ " unless required by applicable law (such as deliberate and grossly",
+ " negligent acts) or agreed to in writing, shall any Contributor be",
+ " liable to You for damages, including any direct, indirect, special,",
+ " incidental, or consequential damages of any character arising as a",
+ " result of this License or out of the use or inability to use the",
+ " Work (including but not limited to damages for loss of goodwill,",
+ " work stoppage, computer failure or malfunction, or any and all",
+ " other commercial damages or losses), even if such Contributor",
+ " has been advised of the possibility of such damages.",
+ "",
+ " 9. Accepting Warranty or Additional Liability. While redistributing",
+ " the Work or Derivative Works thereof, You may choose to offer,",
+ " and charge a fee for, acceptance of support, warranty, indemnity,",
+ " or other liability obligations and/or rights consistent with this",
+ " License. However, in accepting such obligations, You may act only",
+ " on Your own behalf and on Your sole responsibility, not on behalf",
+ " of any other Contributor, and only if You agree to indemnify,",
+ " defend, and hold each Contributor harmless for any liability",
+ " incurred by, or claims asserted against, such Contributor by reason",
+ " of your accepting any such warranty or additional liability.",
+ "",
+ " END OF TERMS AND CONDITIONS"
+ ]
+},
+{
+ "isLicense": true, // We override the license since we need a coorect Copyright
+ "name": "typescript",
+ "version": "2.0.6",
+ "license": "Apache2",
+ "repositoryURL": "https://github.com/Microsoft/TypeScript",
+ "description": "The contents of the folder lib is from the TypeScript project https://github.com/Microsoft/TypeScript.",
+ // Reason: LICENSE file does not include Copyright statement
+ "licenseDetail": [
+ "Copyright (c) Microsoft Corporation. All rights reserved.",
+ "",
+ "Apache License",
+ "",
+ "Version 2.0, January 2004",
+ "",
+ "http://www.apache.org/licenses/",
+ "",
+ "TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION",
+ "",
+ "1. Definitions.",
+ "",
+ "\"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.",
+ "",
+ "\"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.",
+ "",
+ "\"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.",
+ "",
+ "\"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.",
+ "",
+ "\"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.",
+ "",
+ "\"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.",
+ "",
+ "\"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).",
+ "",
+ "\"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.",
+ "",
+ "\"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"",
+ "",
+ "\"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.",
+ "",
+ "2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.",
+ "",
+ "3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.",
+ "",
+ "4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:",
+ "",
+ "You must give any other recipients of the Work or Derivative Works a copy of this License; and",
+ "",
+ "You must cause any modified files to carry prominent notices stating that You changed the files; and",
+ "",
+ "You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and",
+ "",
+ "If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.",
+ "",
+ "5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.",
+ "",
+ "6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.",
+ "",
+ "7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.",
+ "",
+ "8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.",
+ "",
+ "9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.",
+ "",
+ "END OF TERMS AND CONDITIONS"
+ ]
}] \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/language-configuration.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/language-configuration.json
index 8427adb1b2..f25940db45 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/language-configuration.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/language-configuration.json
@@ -6,8 +6,7 @@
"brackets": [
["{", "}"],
["[", "]"],
- ["(", ")"],
- ["<", ">"]
+ ["(", ")"]
],
"autoClosingPairs": [
{ "open": "{", "close": "}" },
@@ -22,7 +21,6 @@
["{", "}"],
["[", "]"],
["(", ")"],
- ["<", ">"],
["'", "'"],
["\"", "\""],
["`", "`"]
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/npm-shrinkwrap.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/npm-shrinkwrap.json
index 6d246f83d4..9a82d48013 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/npm-shrinkwrap.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/npm-shrinkwrap.json
@@ -3,24 +3,29 @@
"version": "0.10.1",
"dependencies": {
"applicationinsights": {
- "version": "0.15.6",
- "from": "applicationinsights@0.15.6",
- "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.15.6.tgz"
+ "version": "0.18.0",
+ "from": "applicationinsights@0.18.0",
+ "resolved": "https://registry.npmjs.org/applicationinsights/-/applicationinsights-0.18.0.tgz"
+ },
+ "semver": {
+ "version": "4.3.6",
+ "from": "semver@4.3.6",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
},
"vscode-extension-telemetry": {
- "version": "0.0.5",
- "from": "vscode-extension-telemetry@>=0.0.5 <0.0.6",
- "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.5.tgz"
+ "version": "0.0.6",
+ "from": "vscode-extension-telemetry@>=0.0.6 <0.0.7",
+ "resolved": "https://registry.npmjs.org/vscode-extension-telemetry/-/vscode-extension-telemetry-0.0.6.tgz"
},
"vscode-nls": {
"version": "2.0.1",
- "from": "vscode-nls@>=1.0.4 <2.0.0",
- "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-1.0.7.tgz"
+ "from": "vscode-nls@>=2.0.1 <3.0.0",
+ "resolved": "https://registry.npmjs.org/vscode-nls/-/vscode-nls-2.0.1.tgz"
},
"winreg": {
- "version": "0.0.13",
- "from": "winreg@0.0.13",
- "resolved": "https://registry.npmjs.org/winreg/-/winreg-0.0.13.tgz"
+ "version": "1.2.3",
+ "from": "winreg@1.2.3",
+ "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.3.tgz"
}
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.json
index ed1d8493bc..e3edc8ce90 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.json
@@ -1,250 +1,504 @@
{
- "name": "typescript",
- "description": "Extension to add Typescript capabilities to VSCode.",
- "displayName": "TypeScript support for VSCode",
- "version": "0.10.1",
- "author": "Microsoft Corporation",
- "license": "MIT",
- "publisher": "vscode",
- "aiKey":"AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
- "engines": {
- "vscode": "*"
- },
- "dependencies": {
- "vscode-extension-telemetry": "^0.0.5",
- "vscode-nls": "^2.0.1"
- },
- "scripts": {
- "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json",
- "update-grammars": "node ./build/update-grammars.js"
- },
- "activationEvents": [
- "onLanguage:javascript",
- "onLanguage:javascriptreact",
- "onLanguage:typescript",
- "onLanguage:typescriptreact",
- "onCommand:typescript.reloadProjects",
- "onCommand:javascript.reloadProjects"
- ],
- "main": "./out/typescriptMain",
- "contributes": {
- "languages": [
- {
- "id": "typescript",
- "aliases": [
- "TypeScript",
- "ts",
- "typescript"
- ],
- "extensions": [
- ".ts"
- ],
- "configuration": "./language-configuration.json"
- },
- {
- "id": "typescriptreact",
- "aliases": [
- "TypeScript React",
- "tsx"
- ],
- "extensions": [
- ".tsx"
- ],
- "configuration": "./language-configuration.json"
- }
- ],
- "grammars": [
- {
- "language": "typescript",
- "scopeName": "source.ts",
- "path": "./syntaxes/TypeScript.tmLanguage.json"
- },
- {
- "language": "typescriptreact",
- "scopeName": "source.tsx",
- "path": "./syntaxes/TypeScriptReact.tmLanguage.json"
- }
- ],
- "configuration": {
- "type": "object",
- "title": "%configuration.typescript%",
- "order": 20,
- "properties": {
- "typescript.tsdk": {
- "type": ["string", "null"],
- "default": null,
- "description": "%typescript.tsdk.desc%"
- },
- "typescript.check.workspaceVersion" :{
- "type": "boolean",
- "default": true,
- "description": "%typescript.check.workspaceVersion%"
- },
- "typescript.check.tscVersion" :{
- "type": "boolean",
- "default": true,
- "description": "%typescript.check.tscVersion%"
- },
- "typescript.tsserver.trace": {
- "type": "string",
- "enum": ["off", "messages", "verbose"],
- "default": "off",
- "description": "%typescript.tsserver.trace%"
- },
- "typescript.tsserver.experimentalAutoBuild": {
- "type": "boolean",
- "default": false,
- "description": "%typescript.tsserver.experimentalAutoBuild%"
- },
- "typescript.useCodeSnippetsOnMethodSuggest": {
- "type": "boolean",
- "default": false,
- "description": "%typescript.useCodeSnippetsOnMethodSuggest.dec%"
- },
- "typescript.validate.enable": {
- "type": "boolean",
- "default": true,
- "description": "%typescript.validate.enable%"
- },
- "typescript.format.insertSpaceAfterCommaDelimiter": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterCommaDelimiter%"
- },
- "typescript.format.insertSpaceAfterSemicolonInForStatements": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterSemicolonInForStatements%"
- },
- "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%"
- },
- "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%"
- },
- "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%"
- },
- "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": {
- "type": "boolean",
- "default": false,
- "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%"
- },
- "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": {
- "type": "boolean",
- "default": false,
- "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%"
- },
- "typescript.format.placeOpenBraceOnNewLineForFunctions": {
- "type": "boolean",
- "default": false,
- "description": "%format.placeOpenBraceOnNewLineForFunctions%"
- },
- "typescript.format.placeOpenBraceOnNewLineForControlBlocks": {
- "type": "boolean",
- "default": false,
- "description": "%format.placeOpenBraceOnNewLineForControlBlocks%"
- },
- "javascript.validate.enable": {
- "type": "boolean",
- "default": true,
- "description": "%javascript.validate.enable%"
- },
- "javascript.format.insertSpaceAfterCommaDelimiter": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterCommaDelimiter%"
- },
- "javascript.format.insertSpaceAfterSemicolonInForStatements": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterSemicolonInForStatements%"
- },
- "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%"
- },
- "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%"
- },
- "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": {
- "type": "boolean",
- "default": true,
- "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%"
- },
- "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": {
- "type": "boolean",
- "default": false,
- "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%"
- },
- "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": {
- "type": "boolean",
- "default": false,
- "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%"
- },
- "javascript.format.placeOpenBraceOnNewLineForFunctions": {
- "type": "boolean",
- "default": false,
- "description": "%format.placeOpenBraceOnNewLineForFunctions%"
- },
- "javascript.format.placeOpenBraceOnNewLineForControlBlocks": {
- "type": "boolean",
- "default": false,
- "description": "%format.placeOpenBraceOnNewLineForControlBlocks%"
- }
- }
- },
- "keybindings": {
- "key": ".",
- "command": "^acceptSelectedSuggestion",
- "when": "editorTextFocus && suggestWidgetVisible && editorLangId == 'typescript' && suggestionSupportsAcceptOnKey"
- },
- "commands": [
- {
- "command": "typescript.reloadProjects",
- "title": "%typescript.reloadProjects.title%"
- },
- {
- "command": "javascript.reloadProjects",
- "title": "%javascript.reloadProjects.title%"
- }
- ],
- "breakpoints": [
- {
- "language": "typescript"
- },
- {
- "language": "typescriptreact"
- }
- ],
- "snippets": [
- {
- "language": "typescript",
- "path": "./snippets/typescript.json"
- },
- {
- "language": "typescriptreact",
- "path": "./snippets/typescriptreact.json"
- }
- ],
- "jsonValidation": [
- {
- "fileMatch": "tsconfig.json",
- "url": "http://json.schemastore.org/tsconfig"
- },
- {
- "fileMatch": "tsconfig.json",
- "url": "./schemas/tsconfig.schema.json"
- }
- ]
- }
+ "name": "typescript",
+ "description": "Extension to add Typescript capabilities to VSCode.",
+ "displayName": "TypeScript support for VSCode",
+ "version": "0.10.1",
+ "author": "Microsoft Corporation",
+ "license": "MIT",
+ "publisher": "vscode",
+ "aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",
+ "engines": {
+ "vscode": "*"
+ },
+ "enableProposedApi": true,
+ "dependencies": {
+ "semver": "4.3.6",
+ "vscode-extension-telemetry": "^0.0.7",
+ "vscode-nls": "^2.0.1"
+ },
+ "devDependencies": {
+ "@types/node": "^7.0.4",
+ "@types/semver": "^5.3.30"
+ },
+ "scripts": {
+ "vscode:prepublish": "node ../../node_modules/gulp/bin/gulp.js --gulpfile ../../build/gulpfile.extensions.js compile-extension:typescript ./tsconfig.json",
+ "update-grammar": "node ./build/update-grammars.js"
+ },
+ "activationEvents": [
+ "onLanguage:javascript",
+ "onLanguage:javascriptreact",
+ "onLanguage:typescript",
+ "onLanguage:typescriptreact",
+ "onLanguage:jsx-tags",
+ "onCommand:typescript.reloadProjects",
+ "onCommand:javascript.reloadProjects",
+ "onCommand:typescript.selectTypeScriptVersion",
+ "onCommand:javascript.goToProjectConfig",
+ "onCommand:typescript.goToProjectConfig",
+ "onCommand:typescript.openTsServerLog",
+ "onCommand:workbench.action.tasks.runTask"
+ ],
+ "main": "./out/typescriptMain",
+ "contributes": {
+ "languages": [
+ {
+ "id": "typescript",
+ "aliases": [
+ "TypeScript",
+ "ts",
+ "typescript"
+ ],
+ "extensions": [
+ ".ts"
+ ],
+ "configuration": "./language-configuration.json"
+ },
+ {
+ "id": "typescriptreact",
+ "aliases": [
+ "TypeScript React",
+ "tsx"
+ ],
+ "extensions": [
+ ".tsx"
+ ],
+ "configuration": "./language-configuration.json"
+ }
+ ],
+ "grammars": [
+ {
+ "language": "typescript",
+ "scopeName": "source.ts",
+ "path": "./syntaxes/TypeScript.tmLanguage.json"
+ },
+ {
+ "language": "typescriptreact",
+ "scopeName": "source.tsx",
+ "path": "./syntaxes/TypeScriptReact.tmLanguage.json",
+ "embeddedLanguages": {
+ "meta.tag.tsx": "jsx-tags",
+ "meta.tag.without-attributes.tsx": "jsx-tags"
+ }
+ }
+ ],
+ "configuration": {
+ "type": "object",
+ "title": "%configuration.typescript%",
+ "order": 20,
+ "properties": {
+ "typescript.tsdk": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "default": null,
+ "description": "%typescript.tsdk.desc%"
+ },
+ "typescript.disableAutomaticTypeAcquisition": {
+ "type": "boolean",
+ "default": false,
+ "description": "%typescript.disableAutomaticTypeAcquisition%"
+ },
+ "typescript.check.tscVersion": {
+ "type": "boolean",
+ "default": true,
+ "description": "%typescript.check.tscVersion%"
+ },
+ "typescript.npm": {
+ "type": [
+ "string",
+ "null"
+ ],
+ "default": null,
+ "description": "%typescript.npm%",
+ "isExecutable": true
+ },
+ "typescript.check.npmIsInstalled": {
+ "type": "boolean",
+ "default": true,
+ "description": "%typescript.check.npmIsInstalled%"
+ },
+ "javascript.referencesCodeLens.enabled": {
+ "type": "boolean",
+ "default": false,
+ "description": "%javascript.referencesCodeLens.enabled%"
+ },
+ "typescript.referencesCodeLens.enabled": {
+ "type": "boolean",
+ "default": false,
+ "description": "%typescript.referencesCodeLens.enabled%"
+ },
+ "typescript.implementationsCodeLens.enabled": {
+ "type": "boolean",
+ "default": false,
+ "description": "%typescript.implementationsCodeLens.enabled%"
+ },
+ "typescript.tsserver.log": {
+ "type": "string",
+ "enum": [
+ "off",
+ "terse",
+ "normal",
+ "verbose"
+ ],
+ "default": "off",
+ "description": "%typescript.tsserver.log%"
+ },
+ "typescript.tsserver.trace": {
+ "type": "string",
+ "enum": [
+ "off",
+ "messages",
+ "verbose"
+ ],
+ "default": "off",
+ "description": "%typescript.tsserver.trace%"
+ },
+ "typescript.useCodeSnippetsOnMethodSuggest": {
+ "type": "boolean",
+ "default": false,
+ "description": "%typescript.useCodeSnippetsOnMethodSuggest.dec%"
+ },
+ "typescript.validate.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%typescript.validate.enable%"
+ },
+ "typescript.format.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%typescript.format.enable%"
+ },
+ "typescript.format.insertSpaceAfterCommaDelimiter": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterCommaDelimiter%"
+ },
+ "typescript.format.insertSpaceAfterConstructor": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterConstructor%"
+ },
+ "typescript.format.insertSpaceAfterSemicolonInForStatements": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterSemicolonInForStatements%"
+ },
+ "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%"
+ },
+ "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%"
+ },
+ "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%"
+ },
+ "typescript.format.insertSpaceBeforeFunctionParenthesis": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceBeforeFunctionParenthesis%"
+ },
+ "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%"
+ },
+ "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%"
+ },
+ "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces%"
+ },
+ "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces%"
+ },
+ "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%"
+ },
+ "typescript.format.placeOpenBraceOnNewLineForFunctions": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.placeOpenBraceOnNewLineForFunctions%"
+ },
+ "typescript.format.placeOpenBraceOnNewLineForControlBlocks": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.placeOpenBraceOnNewLineForControlBlocks%"
+ },
+ "javascript.validate.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%javascript.validate.enable%"
+ },
+ "javascript.format.enable": {
+ "type": "boolean",
+ "default": true,
+ "description": "%javascript.format.enable%"
+ },
+ "javascript.format.insertSpaceAfterCommaDelimiter": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterCommaDelimiter%"
+ },
+ "javascript.format.insertSpaceAfterConstructor": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterConstructor%"
+ },
+ "javascript.format.insertSpaceAfterSemicolonInForStatements": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterSemicolonInForStatements%"
+ },
+ "javascript.format.insertSpaceBeforeAndAfterBinaryOperators": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceBeforeAndAfterBinaryOperators%"
+ },
+ "javascript.format.insertSpaceAfterKeywordsInControlFlowStatements": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterKeywordsInControlFlowStatements%"
+ },
+ "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterFunctionKeywordForAnonymousFunctions%"
+ },
+ "javascript.format.insertSpaceBeforeFunctionParenthesis": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceBeforeFunctionParenthesis%"
+ },
+ "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis%"
+ },
+ "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets%"
+ },
+ "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": {
+ "type": "boolean",
+ "default": true,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces%"
+ },
+ "javascript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces%"
+ },
+ "javascript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces%"
+ },
+ "javascript.format.placeOpenBraceOnNewLineForFunctions": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.placeOpenBraceOnNewLineForFunctions%"
+ },
+ "javascript.format.placeOpenBraceOnNewLineForControlBlocks": {
+ "type": "boolean",
+ "default": false,
+ "description": "%format.placeOpenBraceOnNewLineForControlBlocks%"
+ },
+ "jsDocCompletion.enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "%jsDocCompletion.enabled%"
+ },
+ "javascript.implicitProjectConfig.checkJs": {
+ "type": "boolean",
+ "default": false,
+ "description": "%javascript.implicitProjectConfig.checkJs%"
+ },
+ "javascript.nameSuggestions": {
+ "type": "boolean",
+ "default": true,
+ "description": "%javascript.nameSuggestions%"
+ },
+ "typescript.tsc.autoDetect": {
+ "type": "string",
+ "default": "on",
+ "enum": [
+ "on",
+ "off"
+ ],
+ "description": "%typescript.tsc.autoDetect%"
+ }
+ }
+ },
+ "commands": [
+ {
+ "command": "typescript.reloadProjects",
+ "title": "%typescript.reloadProjects.title%",
+ "category": "TypeScript"
+ },
+ {
+ "command": "javascript.reloadProjects",
+ "title": "%javascript.reloadProjects.title%",
+ "category": "JavaScript"
+ },
+ {
+ "command": "typescript.selectTypeScriptVersion",
+ "title": "%typescript.selectTypeScriptVersion.title%",
+ "category": "TypeScript"
+ },
+ {
+ "command": "typescript.goToProjectConfig",
+ "title": "%typescript.goToProjectConfig.title%",
+ "category": "TypeScript"
+ },
+ {
+ "command": "javascript.goToProjectConfig",
+ "title": "%javascript.goToProjectConfig.title%",
+ "category": "JavaScript"
+ },
+ {
+ "command": "typescript.openTsServerLog",
+ "title": "%typescript.openTsServerLog.title%",
+ "category": "TypeScript"
+ },
+ {
+ "command": "typescript.restartTsServer",
+ "title": "%typescript.restartTsServer%",
+ "category": "TypeScript"
+ }
+ ],
+ "menus": {
+ "commandPalette": [
+ {
+ "command": "typescript.reloadProjects",
+ "when": "editorLangId == 'typescript'"
+ },
+ {
+ "command": "typescript.reloadProjects",
+ "when": "editorLangId == typescriptreact"
+ },
+ {
+ "command": "javascript.reloadProjects",
+ "when": "editorLangId == 'javascript'"
+ },
+ {
+ "command": "javascript.reloadProjects",
+ "when": "editorLangId == javascriptreact"
+ },
+ {
+ "command": "typescript.goToProjectConfig",
+ "when": "editorLangId == 'typescript'"
+ },
+ {
+ "command": "typescript.goToProjectConfig",
+ "when": "editorLangId == typescriptreact"
+ },
+ {
+ "command": "javascript.goToProjectConfig",
+ "when": "editorLangId == 'javascript'"
+ },
+ {
+ "command": "javascript.goToProjectConfig",
+ "when": "editorLangId == javascriptreact"
+ }
+ ]
+ },
+ "breakpoints": [
+ {
+ "language": "typescript"
+ },
+ {
+ "language": "typescriptreact"
+ }
+ ],
+ "snippets": [
+ {
+ "language": "typescript",
+ "path": "./snippets/typescript.json"
+ },
+ {
+ "language": "typescriptreact",
+ "path": "./snippets/typescriptreact.json"
+ }
+ ],
+ "jsonValidation": [
+ {
+ "fileMatch": "tsconfig.json",
+ "url": "http://json.schemastore.org/tsconfig"
+ },
+ {
+ "fileMatch": "tsconfig.json",
+ "url": "./schemas/tsconfig.schema.json"
+ },
+ {
+ "fileMatch": "tsconfig.*.json",
+ "url": "http://json.schemastore.org/tsconfig"
+ },
+ {
+ "fileMatch": "tsconfig.*.json",
+ "url": "./schemas/tsconfig.schema.json"
+ },
+ {
+ "fileMatch": "typings.json",
+ "url": "http://json.schemastore.org/typings"
+ }
+ ],
+ "problemPatterns": [
+ {
+ "name": "tsc",
+ "regexp": "^([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\):\\s+(error|warning|info)\\s+(TS\\d+)\\s*:\\s*(.*)$",
+ "file": 1,
+ "location": 2,
+ "severity": 3,
+ "code": 4,
+ "message": 5
+ }
+ ],
+ "problemMatchers": [
+ {
+ "name": "tsc",
+ "owner": "typescript",
+ "applyTo": "closedDocuments",
+ "fileLocation": [
+ "relative",
+ "${cwd}"
+ ],
+ "pattern": "$tsc"
+ },
+ {
+ "name": "tsc-watch",
+ "owner": "typescript",
+ "applyTo": "closedDocuments",
+ "fileLocation": [
+ "relative",
+ "${cwd}"
+ ],
+ "pattern": "$tsc",
+ "background": {
+ "activeOnStart": true,
+ "beginsPattern": {
+ "regexp": "^\\s*(?:message TS6032:|\\d{1,2}:\\d{1,2}:\\d{1,2}(?: AM| PM)? -) File change detected\\. Starting incremental compilation\\.\\.\\."
+ },
+ "endsPattern": {
+ "regexp": "^\\s*(?:message TS6042:|\\d{1,2}:\\d{1,2}:\\d{1,2}(?: AM| PM)? -) Compilation complete\\. Watching for file changes\\."
+ }
+ }
+ }
+ ]
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.nls.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.nls.json
index 4871ebf4f5..9dbfd2d456 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.nls.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/package.nls.json
@@ -1,23 +1,43 @@
{
- "typescript.reloadProjects.title": "Reload TypeScript Project",
- "javascript.reloadProjects.title": "Reload JavaScript Project",
+ "typescript.reloadProjects.title": "Reload Project",
+ "javascript.reloadProjects.title": "Reload Project",
"configuration.typescript": "TypeScript",
"typescript.useCodeSnippetsOnMethodSuggest.dec": "Complete functions with their parameter signature.",
"typescript.tsdk.desc": "Specifies the folder path containing the tsserver and lib*.d.ts files to use.",
- "typescript.tsdk_version.desc": "Specifies the version of the tsserver. Only necessary if the tsserver is not installed using npm.",
- "typescript.check.workspaceVersion": "Check if a TypeScript version is available in the workspace",
+ "typescript.disableAutomaticTypeAcquisition": "Disables automatic type acquisition. Requires TypeScript >= 2.0.6 and a restart after changing it.",
"typescript.check.tscVersion": "Check if a global install TypeScript compiler (e.g. tsc) differs from the used TypeScript language service.",
- "typescript.tsserver.trace": "Enables tracing of messages send to the TS server",
- "typescript.tsserver.experimentalAutoBuild": "Enables experimental auto build. Requires 1.9 dev or 2.x tsserver version and a restart of VS Code after changing it.",
- "typescript.validate.enable": "Enable / disable TypeScript validation",
- "format.insertSpaceAfterCommaDelimiter": "Defines space handling after a comma delimiter",
- "format.insertSpaceAfterSemicolonInForStatements": " Defines space handling after a semicolon in a for statement",
- "format.insertSpaceBeforeAndAfterBinaryOperators": "Defines space handling after a binary operator",
- "format.insertSpaceAfterKeywordsInControlFlowStatements": "Defines space handling after keywords in control flow statement",
- "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Defines space handling after function keyword for anonymous functions",
- "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Defines space handling after opening and before closing non empty parenthesis",
- "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Defines space handling after opening and before closing non empty brackets",
- "format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not",
- "format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not",
- "javascript.validate.enable": "Enable / disable JavaScript validation"
-} \ No newline at end of file
+ "typescript.tsserver.log": "Enables logging of the TS server to a file. This log can be used to diagnose TS Server issues. The log may contain file paths, source code, and other potentially sensitive information from your project.",
+ "typescript.tsserver.trace": "Enables tracing of messages sent to the TS server. This trace can be used to diagnose TS Server issues. The trace may contain file paths, source code, and other potentially sensitive information from your project.",
+ "typescript.validate.enable": "Enable/disable TypeScript validation.",
+ "typescript.format.enable": "Enable/disable default TypeScript formatter.",
+ "javascript.format.enable": "Enable/disable default JavaScript formatter.",
+ "format.insertSpaceAfterCommaDelimiter": "Defines space handling after a comma delimiter.",
+ "format.insertSpaceAfterConstructor": "Defines space handling after the constructor keyword. Requires TypeScript >= 2.3.0.",
+ "format.insertSpaceAfterSemicolonInForStatements": " Defines space handling after a semicolon in a for statement.",
+ "format.insertSpaceBeforeAndAfterBinaryOperators": "Defines space handling after a binary operator.",
+ "format.insertSpaceAfterKeywordsInControlFlowStatements": "Defines space handling after keywords in a control flow statement.",
+ "format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": "Defines space handling after function keyword for anonymous functions.",
+ "format.insertSpaceBeforeFunctionParenthesis": "Defines space handling before function argument parentheses. Requires TypeScript >= 2.1.5.",
+ "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": "Defines space handling after opening and before closing non empty parenthesis.",
+ "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": "Defines space handling after opening and before closing non empty brackets.",
+ "format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": "Defines space handling after opening and before closing non empty braces. Requires TypeScript >= 2.3.0.",
+ "format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": "Defines space handling after opening and before closing template string braces. Requires TypeScript >= 2.0.6.",
+ "format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": "Defines space handling after opening and before closing JSX expression braces. Requires TypeScript >= 2.0.6.",
+ "format.placeOpenBraceOnNewLineForFunctions": "Defines whether an open brace is put onto a new line for functions or not.",
+ "format.placeOpenBraceOnNewLineForControlBlocks": "Defines whether an open brace is put onto a new line for control blocks or not.",
+ "javascript.validate.enable": "Enable/disable JavaScript validation.",
+ "typescript.goToProjectConfig.title": "Go to Project Configuration",
+ "javascript.goToProjectConfig.title": "Go to Project Configuration",
+ "javascript.referencesCodeLens.enabled": "Enable/disable references CodeLens in JavaScript files.",
+ "typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files. Requires TypeScript >= 2.0.6.",
+ "typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.",
+ "typescript.openTsServerLog.title": "Open TS Server log",
+ "typescript.restartTsServer": "Restart TS server",
+ "typescript.selectTypeScriptVersion.title": "Select TypeScript Version",
+ "jsDocCompletion.enabled": "Enable/disable auto JSDoc comments",
+ "javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.",
+ "typescript.npm": "Specifies the path to the NPM executable used for Automatic Type Acquisition. Requires TypeScript >= 2.3.4.",
+ "typescript.check.npmIsInstalled": "Check if NPM is installed for Automatic Type Acquisition.",
+ "javascript.nameSuggestions": "Enable/disable including unique names from the file in JavaScript suggestion lists.",
+ "typescript.tsc.autoDetect": "Controls whether auto detection of tsc tasks is on or off."
+}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/Readme.md b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/Readme.md
index c60adbcf4a..d45fc85424 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/Readme.md
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/Readme.md
@@ -3,3 +3,14 @@ The file `TypeScript.tmLanguage.json` and `TypeScriptReact.tmLanguage.json` are
To update to the latest version:
- `cd extensions/typescript` and run `npm run update-grammars`
- don't forget to run the integration tests at `./scripts/test-integration.sh`
+
+Migration notes and todos:
+
+- differentiate variable and function declarations from references
+ - I suggest we use a new scope segment 'function-call' to sigmal a function references, and 'definition' to the declaration. Alternative is to use 'support.function' everywhere.
+ - I suggest we use a new scope segment 'definition' to the variable declarations. Haven't yet found a scope for references that other grammars use.
+
+- rename scope to return.type to return-type, which is already used in other grammars
+- rename entity.name.class to entity.name.type.class which is used in all other grammars I've seen
+
+- do we really want to have the list of all the 'library' types (Math, Dom...). It adds a lot of size to the grammar, lots of special rules and is not really correct as it depends on the JavaScript runtime which types are present. \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScript.tmLanguage.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScript.tmLanguage.json
index 3046784200..90c14f0fc9 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScript.tmLanguage.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScript.tmLanguage.json
@@ -1,203 +1,350 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScript.tmLanguage",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
+ "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f",
+ "name": "TypeScript",
+ "scopeName": "source.ts",
"fileTypes": [
"ts"
],
- "name": "TypeScript",
+ "uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a66",
"patterns": [
{
- "include": "#expression"
- }
- ],
- "repository": {
- "access-modifier": {
- "match": "\\b(public|protected|private)\\b",
- "name": "storage.modifier.ts"
+ "include": "#directives"
},
- "arithmetic-operator": {
- "match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%",
- "name": "keyword.operator.arithmetic.ts"
+ {
+ "include": "#statements"
},
- "array-literal": {
- "begin": "\\[",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.square.ts"
- }
- },
- "end": "\\]",
- "endCaptures": {
- "0": {
- "name": "meta.brace.square.ts"
+ {
+ "name": "comment.line.shebang.ts",
+ "match": "\\A(#!).*(?=$)",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.comment.ts"
}
- },
- "name": "meta.array.literal.ts",
+ }
+ }
+ ],
+ "repository": {
+ "statements": {
"patterns": [
{
+ "include": "#string"
+ },
+ {
+ "include": "#template"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#declaration"
+ },
+ {
+ "include": "#switch-statement"
+ },
+ {
+ "include": "#for-loop"
+ },
+ {
+ "include": "#after-operator-block"
+ },
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#control-statement"
+ },
+ {
"include": "#expression"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "assignment-operator": {
- "match": "<<=|>>>=|>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=",
- "name": "keyword.operator.assignment.ts"
- },
- "await-modifier": {
- "match": "\\bawait\\b",
- "name": "storage.modifier.ts"
- },
- "block": {
- "begin": "\\{",
+ "var-expr": {
+ "name": "meta.var.expr.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.curly.ts"
- }
- },
- "end": "\\}",
- "endCaptures": {
- "0": {
- "name": "meta.brace.curly.ts"
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "storage.type.ts"
}
},
- "name": "meta.block.ts",
+ "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
- "include": "#object-member"
+ "include": "#destructuring-variable"
},
{
- "include": "#expression"
+ "include": "#var-single-variable"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#punctuation-comma"
}
]
},
- "boolean-literal": {
- "match": "\\b(false|true)\\b",
- "name": "constant.language.boolean.ts"
+ "var-single-variable": {
+ "patterns": [
+ {
+ "name": "meta.var-single-variable.expr.ts",
+ "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.ts entity.name.function.ts"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ },
+ {
+ "name": "meta.var-single-variable.expr.ts",
+ "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.ts variable.other.constant.ts"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ },
+ {
+ "name": "meta.var-single-variable.expr.ts",
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.ts variable.other.readwrite.ts"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ }
+ ]
},
- "case-clause": {
- "begin": "(?<!\\.)\\b(case|default(?=:))\\b",
- "beginCaptures": {
- "1": {
- "name": "keyword.control.ts"
+ "var-single-variable-type-annotation": {
+ "patterns": [
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#comment"
}
- },
- "end": ":",
- "name": "case-clause.expr.ts",
+ ]
+ },
+ "destructuring-variable": {
"patterns": [
{
- "include": "#expression-type"
+ "name": "meta.object-binding-pattern-variable.ts",
+ "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#comment"
+ }
+ ]
+ },
+ {
+ "name": "meta.array-binding-pattern-variable.ts",
+ "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#array-binding-pattern"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#comment"
+ }
+ ]
}
]
},
- "cast": {
- "begin": "(?:(?<=return|throw|yield|await|[=(,:>]))\\s*(<)(?!<?\\=)",
- "beginCaptures": {
- "1": {
- "name": "meta.brace.angle.ts"
+ "object-binding-element": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#object-binding-element-propertyName"
+ },
+ {
+ "include": "#binding-element"
+ }
+ ]
+ },
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#destructuring-variable-rest"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#punctuation-comma"
}
- },
- "end": ">",
+ ]
+ },
+ "object-binding-element-propertyName": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(:)",
"endCaptures": {
"0": {
- "name": "meta.brace.angle.ts"
+ "name": "punctuation.destructuring.ts"
}
},
- "name": "cast.expr.ts",
"patterns": [
{
- "include": "#type"
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "name": "variable.object.property.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
- "comment": {
- "name": "comment.ts",
+ "binding-element": {
"patterns": [
{
- "include": "#comment-block-doc"
+ "include": "#comment"
+ },
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#array-binding-pattern"
},
{
- "include": "#comment-block"
+ "include": "#destructuring-variable-rest"
},
{
- "include": "#comment-line"
+ "include": "#variable-initializer"
}
]
},
- "comment-block": {
- "begin": "/\\*",
- "end": "\\*/",
- "name": "comment.block.ts"
- },
- "comment-block-doc": {
- "begin": "/\\*\\*(?!/)",
- "end": "\\*/",
- "name": "comment.block.documentation.ts"
- },
- "comment-line": {
- "match": "(//).*$\\n?",
- "name": "comment.line.ts"
- },
- "control-statement": {
- "match": "(?<!\\.)\\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|case|default|yield)\\b",
- "name": "keyword.control.ts"
+ "destructuring-variable-rest": {
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.rest.ts"
+ },
+ "2": {
+ "name": "meta.definition.variable.ts variable.other.readwrite.ts"
+ }
+ }
},
- "decl-block": {
- "begin": "\\{",
+ "object-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.curly.ts"
+ "1": {
+ "name": "keyword.operator.rest.ts"
+ },
+ "2": {
+ "name": "punctuation.definition.binding-pattern.object.ts"
}
},
"end": "\\}",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.ts"
+ "name": "punctuation.definition.binding-pattern.object.ts"
}
},
- "name": "meta.decl.block.ts",
"patterns": [
{
- "include": "#expression"
+ "include": "#object-binding-element"
}
]
},
- "declaration": {
- "name": "meta.declaration.ts",
- "patterns": [
- {
- "include": "#function-declaration"
- },
- {
- "include": "#object-declaration"
+ "array-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.ts"
},
+ "2": {
+ "name": "punctuation.definition.binding-pattern.array.ts"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.ts"
+ }
+ },
+ "patterns": [
{
- "include": "#type-declaration"
+ "include": "#binding-element"
},
{
- "include": "#enum-declaration"
+ "include": "#punctuation-comma"
}
]
},
- "enum-declaration": {
- "captures": {
- "1": {
- "name": "storage.modifier.ts"
- },
- "2": {
- "name": "storage.type.ts"
- },
- "3": {
- "name": "entity.name.class.ts"
+ "ternary-expression": {
+ "begin": "(\\?)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.ts"
+ }
+ },
+ "end": "(:)",
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.ts"
}
},
- "match": "(?:\\b(const)\\s+)?\\b(enum)\\s+([a-zA-Z_$][\\w$]*)",
- "name": "meta.enum.declaration.ts"
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
},
"expression": {
- "name": "meta.expression.ts",
"patterns": [
{
- "include": "#for-in-simple"
- },
- {
"include": "#string"
},
{
@@ -210,996 +357,2944 @@
"include": "#comment"
},
{
- "include": "#literal"
- },
- {
- "include": "#paren-expression"
+ "include": "#function-expression"
},
{
- "include": "#var-expr"
+ "include": "#class-or-interface-declaration"
},
{
- "include": "#declaration"
+ "include": "#arrow-function"
},
{
"include": "#cast"
},
{
- "include": "#new-expr"
- },
- {
- "include": "#switch-statement"
- },
- {
- "include": "#block"
- },
- {
- "include": "#import-operator"
- },
- {
- "include": "#expression-operator"
+ "include": "#ternary-expression"
},
{
- "include": "#imply-operator"
+ "include": "#new-expr"
},
{
- "include": "#relational-operator"
+ "include": "#object-literal"
},
{
- "include": "#arithmetic-operator"
+ "include": "#expression-operators"
},
{
- "include": "#logic-operator"
+ "include": "#function-call"
},
{
- "include": "#assignment-operator"
+ "include": "#literal"
},
{
- "include": "#storage-keyword"
+ "include": "#support-objects"
},
{
- "include": "#type-primitive"
+ "include": "#identifiers"
},
{
- "include": "#function-call"
+ "include": "#paren-expression"
},
{
- "include": "#case-clause"
+ "include": "#punctuation-comma"
},
{
- "include": "#control-statement"
+ "include": "#punctuation-accessor"
}
]
},
- "expression-operator": {
- "match": "\\b(delete|in|instanceof|new|typeof|as|is|of)\\b",
- "name": "keyword.others.ts"
- },
- "expression-type": {
- "name": "meta.expression.ts",
+ "control-statement": {
"patterns": [
{
- "include": "#string"
+ "name": "keyword.control.trycatch.ts",
+ "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$|\\.)"
},
{
- "include": "#regex"
+ "name": "keyword.control.loop.ts",
+ "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$|\\.)"
},
{
- "include": "#template"
+ "name": "keyword.control.flow.ts",
+ "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$|\\.)"
},
{
- "include": "#comment"
+ "name": "keyword.control.switch.ts",
+ "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$|\\.)"
},
{
- "include": "#literal"
+ "name": "keyword.control.conditional.ts",
+ "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$|\\.)"
},
{
- "include": "#paren-expression"
+ "name": "keyword.control.with.ts",
+ "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$|\\.)"
},
{
- "include": "#ternary-expression"
+ "name": "keyword.other.debugger.ts",
+ "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$|\\.)"
},
{
- "include": "#import-operator"
+ "name": "storage.modifier.ts",
+ "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$|\\.)"
+ }
+ ]
+ },
+ "declaration": {
+ "patterns": [
+ {
+ "include": "#decorator"
},
{
- "include": "#expression-operator"
+ "include": "#var-expr"
},
{
- "include": "#imply-operator"
+ "include": "#function-declaration"
},
{
- "include": "#relational-operator"
+ "include": "#class-or-interface-declaration"
},
{
- "include": "#arithmetic-operator"
+ "include": "#type-declaration"
},
{
- "include": "#logic-operator"
+ "include": "#enum-declaration"
},
{
- "include": "#assignment-operator"
+ "include": "#namespace-declaration"
},
{
- "include": "#type-primitive"
+ "include": "#import-equals-declaration"
},
{
- "include": "#function-call"
+ "include": "#import-declaration"
+ },
+ {
+ "include": "#export-declaration"
}
]
},
- "field-declaration": {
- "begin": "(?<!\\()\\s*((?:\\b[a-zA-Z_$][\\w$]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\"))\\s*(\\?\\s*)?(?=(=|:))",
+ "decorator": {
+ "name": "meta.decorator.ts",
+ "begin": "(?<!\\.|\\$)\\@",
"beginCaptures": {
- "1": {
- "name": "variable.ts"
- },
- "2": {
- "name": "keyword.others.ts"
+ "0": {
+ "name": "punctuation.decorator.ts"
}
},
- "end": "(?=\\}|;|,|$)|(?<=\\})",
- "name": "meta.field.declaration.ts",
+ "end": "(?=\\s)",
"patterns": [
{
"include": "#expression"
}
]
},
- "for-in-simple": {
- "captures": {
+ "type-declaration": {
+ "name": "meta.type.declaration.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
+ "beginCaptures": {
"1": {
- "name": "storage.type.ts"
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "storage.type.type.ts"
},
"3": {
- "name": "keyword.others.ts"
+ "name": "entity.name.type.alias.ts"
}
},
- "match": "(?<=\\()\\s*\\b(var|let|const)\\s+([a-zA-Z_$][\\w$]*)\\s+(in|of)\\b",
- "name": "forin.expr.ts"
- },
- "function-call": {
- "name": "functioncall.expr.ts",
+ "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
"patterns": [
{
- "include": "#await-modifier"
+ "include": "#comment"
},
{
"include": "#type-parameters"
},
{
- "include": "#paren-expression"
+ "include": "#type"
+ },
+ {
+ "match": "(=)\\s*",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.assignment.ts"
+ }
+ }
}
]
},
- "function-declaration": {
- "begin": "\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
+ "enum-declaration": {
+ "name": "meta.enum.declaration.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
"beginCaptures": {
"1": {
- "name": "storage.type.ts"
+ "name": "keyword.control.export.ts"
},
"2": {
"name": "storage.modifier.ts"
},
"3": {
- "name": "storage.type.function.ts"
+ "name": "storage.type.enum.ts"
},
"4": {
- "name": "entity.name.function.ts"
+ "name": "entity.name.type.enum.ts"
}
},
- "end": "(?=;|\\})|(?<=\\})",
- "name": "meta.function.ts",
+ "end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#type-parameters"
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
+ "beginCaptures": {
+ "0": {
+ "name": "variable.other.enummember.ts"
+ }
+ },
+ "end": "(?=,|\\}|$)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#variable-initializer"
+ }
+ ]
+ },
+ {
+ "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
+ "end": "(?=,|\\}|$)",
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#variable-initializer"
+ }
+ ]
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ }
+ ]
+ },
+ "namespace-declaration": {
+ "name": "meta.namespace.declaration.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`])",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
},
+ "2": {
+ "name": "storage.type.namespace.ts"
+ }
+ },
+ "end": "(?<=\\})",
+ "patterns": [
{
- "include": "#function-type-parameters"
+ "include": "#comment"
},
{
- "include": "#return-type"
+ "include": "#string"
},
{
- "include": "#function-overload-declaration"
+ "name": "entity.name.type.module.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ },
+ {
+ "include": "#punctuation-accessor"
},
{
"include": "#decl-block"
}
]
},
- "function-overload-declaration": {
- "captures": {
+ "import-equals-declaration": {
+ "patterns": [
+ {
+ "name": "meta.import-equals.external.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "keyword.control.import.ts"
+ },
+ "3": {
+ "name": "variable.other.readwrite.alias.ts"
+ },
+ "4": {
+ "name": "keyword.operator.assignment.ts"
+ },
+ "5": {
+ "name": "keyword.control.require.ts"
+ },
+ "6": {
+ "name": "meta.brace.round.ts"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#string"
+ }
+ ]
+ },
+ {
+ "name": "meta.import-equals.internal.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "keyword.control.import.ts"
+ },
+ "3": {
+ "name": "variable.other.readwrite.alias.ts"
+ },
+ "4": {
+ "name": "keyword.operator.assignment.ts"
+ }
+ },
+ "end": "(?=;|$)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ }
+ }
+ },
+ {
+ "name": "variable.other.readwrite.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ }
+ ]
+ }
+ ]
+ },
+ "import-declaration": {
+ "name": "meta.import.ts",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$|\\.))\\b",
+ "beginCaptures": {
"1": {
- "name": "storage.type.ts"
+ "name": "keyword.control.export.ts"
},
"2": {
- "name": "storage.type.function.ts"
- },
- "3": {
- "name": "entity.name.function.ts"
+ "name": "keyword.control.import.ts"
}
},
- "match": "\\b(?:(export)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
- "name": "meta.function.overload.ts"
+ "end": "(?=;|$)",
+ "patterns": [
+ {
+ "include": "#import-export-declaration"
+ }
+ ]
},
- "function-type-parameters": {
- "begin": "\\(",
+ "export-declaration": {
+ "patterns": [
+ {
+ "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "keyword.control.as.ts"
+ },
+ "3": {
+ "name": "storage.type.namespace.ts"
+ },
+ "4": {
+ "name": "entity.name.type.module.ts"
+ }
+ }
+ },
+ {
+ "name": "meta.export.default.ts",
+ "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "keyword.operator.assignment.ts"
+ },
+ "3": {
+ "name": "keyword.control.default.ts"
+ }
+ },
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.export.ts",
+ "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.export.ts"
+ }
+ },
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
+ "patterns": [
+ {
+ "include": "#import-export-declaration"
+ }
+ ]
+ }
+ ]
+ },
+ "import-export-declaration": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#import-export-block"
+ },
+ {
+ "name": "keyword.control.from.ts",
+ "match": "\\bfrom\\b"
+ },
+ {
+ "include": "#import-export-clause"
+ }
+ ]
+ },
+ "import-export-block": {
+ "name": "meta.block.ts",
+ "begin": "\\{",
"beginCaptures": {
"0": {
- "name": "meta.brace.round.ts"
+ "name": "punctuation.definition.block.ts"
}
},
- "end": "\\)",
+ "end": "\\}",
"endCaptures": {
"0": {
- "name": "meta.brace.round.ts"
+ "name": "punctuation.definition.block.ts"
}
},
- "name": "meta.function.type.parameter.ts",
+ "patterns": [
+ {
+ "include": "#import-export-clause"
+ }
+ ]
+ },
+ "import-export-clause": {
"patterns": [
{
"include": "#comment"
},
{
- "include": "#parameter-name"
+ "comment": "(default|*|name) as alias",
+ "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ \n (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
+ "captures": {
+ "1": {
+ "name": "keyword.control.default.ts"
+ },
+ "2": {
+ "name": "constant.language.import-export-all.ts"
+ },
+ "3": {
+ "name": "variable.other.readwrite.ts"
+ },
+ "4": {
+ "name": "keyword.control.as.ts"
+ },
+ "5": {
+ "name": "invalid.illegal.ts"
+ },
+ "6": {
+ "name": "variable.other.readwrite.alias.ts"
+ }
+ }
},
{
- "include": "#type-annotation"
+ "include": "#punctuation-comma"
},
{
- "include": "#variable-initializer"
+ "name": "constant.language.import-export-all.ts",
+ "match": "\\*"
+ },
+ {
+ "name": "keyword.control.default.ts",
+ "match": "\\b(default)\\b"
+ },
+ {
+ "name": "variable.other.readwrite.alias.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
- "imply-operator": {
- "match": "=>",
- "name": "keyword.operator.ts"
- },
- "import-operator": {
- "match": "\\b(import|from)\\b",
- "name": "keyword.control.import.include.ts"
+ "class-or-interface-declaration": {
+ "patterns": [
+ {
+ "name": "meta.class.ts",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "storage.modifier.ts"
+ },
+ "3": {
+ "name": "storage.type.class.ts"
+ }
+ },
+ "end": "(?<=\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.class.ts"
+ }
+ }
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#class-or-interface-body"
+ }
+ ]
+ },
+ {
+ "name": "meta.interface.ts",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
+ },
+ "2": {
+ "name": "storage.modifier.ts"
+ },
+ "3": {
+ "name": "storage.type.interface.ts"
+ }
+ },
+ "end": "(?<=\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.interface.ts"
+ }
+ }
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#class-or-interface-body"
+ }
+ ]
+ }
+ ]
},
- "indexer-declaration": {
- "begin": "\\[",
+ "class-or-interface-heritage": {
+ "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.square.ts"
+ "1": {
+ "name": "storage.modifier.ts"
}
},
- "end": "(\\])\\s*(\\?\\s*)?|$",
+ "end": "(?=\\{)",
"endCaptures": {
"1": {
- "name": "meta.brace.square.ts"
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
},
- "2": {
- "name": "keyword.others.ts"
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ }
+ }
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
+ "captures": {
+ "1": {
+ "name": "entity.other.inherited-class.ts"
+ }
+ }
+ },
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ "class-or-interface-body": {
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
}
},
- "name": "meta.indexer.declaration.ts",
"patterns": [
{
+ "include": "#string"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#decorator"
+ },
+ {
+ "include": "#method-declaration"
+ },
+ {
+ "include": "#indexer-declaration"
+ },
+ {
+ "include": "#field-declaration"
+ },
+ {
"include": "#type-annotation"
},
{
- "include": "#indexer-parameter"
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#access-modifier"
+ },
+ {
+ "include": "#property-accessor"
+ },
+ {
+ "include": "#after-operator-block"
+ },
+ {
+ "include": "#decl-block"
},
{
"include": "#expression"
+ },
+ {
+ "include": "#punctuation-comma"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "indexer-parameter": {
- "captures": {
- "1": {
- "name": "variable.parameter.ts"
+ "type-object": {
+ "name": "meta.object.type.ts",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
}
},
- "match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
- "name": "meta.indexer.parameter.ts"
- },
- "literal": {
- "name": "literal.ts",
"patterns": [
{
- "include": "#numeric-literal"
+ "include": "#comment"
},
{
- "include": "#boolean-literal"
+ "include": "#method-declaration"
},
{
- "include": "#null-literal"
+ "include": "#indexer-declaration"
},
{
- "include": "#undefined-literal"
+ "include": "#indexer-mapped-type-declaration"
},
{
- "include": "#array-literal"
+ "include": "#field-declaration"
},
{
- "include": "#this-literal"
+ "include": "#type-annotation"
+ },
+ {
+ "begin": "\\.\\.\\.",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.spread.ts"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "include": "#punctuation-comma"
+ },
+ {
+ "include": "#punctuation-semicolon"
+ },
+ {
+ "include": "#type"
}
]
},
- "logic-operator": {
- "match": "\\!|&&|&|~|\\^|\\|\\||\\|",
- "name": "keyword.operator.arithmetic.ts"
- },
- "method-declaration": {
- "begin": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
+ "field-declaration": {
+ "name": "meta.field.declaration.ts",
+ "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
"beginCaptures": {
"1": {
"name": "storage.modifier.ts"
+ }
+ },
+ "end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#variable-initializer"
},
- "2": {
- "name": "storage.modifier.ts"
- },
- "3": {
- "name": "storage.modifier.ts"
+ {
+ "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
+ "end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "name": "meta.definition.property.ts entity.name.function.ts",
+ "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)"
+ },
+ {
+ "name": "meta.definition.property.ts variable.object.property.ts",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
+ },
+ {
+ "name": "keyword.operator.optional.ts",
+ "match": "\\?"
+ }
+ ]
+ }
+ ]
+ },
+ "method-declaration": {
+ "patterns": [
+ {
+ "name": "meta.method.declaration.ts",
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.ts"
+ },
+ "2": {
+ "name": "storage.modifier.ts"
+ },
+ "3": {
+ "name": "storage.modifier.async.ts"
+ },
+ "4": {
+ "name": "storage.type.property.ts"
+ },
+ "5": {
+ "name": "keyword.generator.asterisk.ts"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
+ },
+ {
+ "name": "meta.method.declaration.ts",
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.ts"
+ },
+ "2": {
+ "name": "storage.modifier.ts"
+ },
+ "3": {
+ "name": "storage.modifier.async.ts"
+ },
+ "4": {
+ "name": "keyword.operator.new.ts"
+ },
+ "5": {
+ "name": "storage.type.ts"
+ },
+ "6": {
+ "name": "keyword.generator.asterisk.ts"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
+ }
+ ]
+ },
+ "method-declaration-name": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
+ "end": "(?=\\(|\\<)",
+ "patterns": [
+ {
+ "include": "#string"
},
- "4": {
- "name": "storage.type.property.ts"
+ {
+ "include": "#array-literal"
},
- "5": {
- "name": "keyword.operator.ts"
+ {
+ "name": "meta.definition.method.ts entity.name.function.ts",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
},
- "6": {
- "name": "storage.type.ts"
+ {
+ "name": "keyword.operator.optional.ts",
+ "match": "\\?"
+ }
+ ]
+ },
+ "object-literal-method-declaration": {
+ "name": "meta.method.declaration.ts",
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.async.ts"
},
- "7": {
- "name": "entity.name.function.ts"
+ "2": {
+ "name": "storage.type.property.ts"
},
- "8": {
- "name": "keyword.operator.ts"
+ "3": {
+ "name": "keyword.generator.asterisk.ts"
}
},
"end": "(?=\\}|;|,)|(?<=\\})",
- "name": "meta.method.declaration.ts",
"patterns": [
{
+ "include": "#method-declaration-name"
+ },
+ {
"include": "#comment"
},
{
"include": "#type-parameters"
},
{
- "include": "#function-type-parameters"
+ "include": "#function-parameters"
},
{
- "include": "#type-annotation"
+ "include": "#return-type"
},
{
- "include": "#method-overload-declaration"
+ "include": "#object-literal-method-overload-declaration"
},
{
"include": "#decl-block"
}
]
},
- "method-overload-declaration": {
- "captures": {
+ "object-literal-method-overload-declaration": {
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
"1": {
- "name": "storage.modifier.ts"
+ "name": "storage.modifier.async.ts"
},
"2": {
+ "name": "storage.type.property.ts"
+ },
+ "3": {
+ "name": "keyword.generator.asterisk.ts"
+ }
+ },
+ "end": "(?=\\(|\\<)",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ }
+ ]
+ },
+ "indexer-declaration": {
+ "name": "meta.indexer.declaration.ts",
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
+ "beginCaptures": {
+ "1": {
"name": "storage.modifier.ts"
},
+ "2": {
+ "name": "meta.brace.square.ts"
+ },
"3": {
+ "name": "variable.parameter.ts"
+ }
+ },
+ "end": "(\\])\\s*(\\?\\s*)?|$",
+ "endCaptures": {
+ "1": {
+ "name": "meta.brace.square.ts"
+ },
+ "2": {
+ "name": "keyword.operator.optional.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type-annotation"
+ }
+ ]
+ },
+ "indexer-mapped-type-declaration": {
+ "name": "meta.indexer.mappedtype.declaration.ts",
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
+ "beginCaptures": {
+ "1": {
"name": "storage.modifier.ts"
},
+ "2": {
+ "name": "meta.brace.square.ts"
+ },
+ "3": {
+ "name": "entity.name.type.ts"
+ },
"4": {
- "name": "storage.type.property.ts"
+ "name": "keyword.operator.expression.in.ts"
+ }
+ },
+ "end": "(\\])\\s*(\\?\\s*)?|$",
+ "endCaptures": {
+ "1": {
+ "name": "meta.brace.square.ts"
},
- "5": {
- "name": "keyword.operator.ts"
+ "2": {
+ "name": "keyword.operator.optional.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ "function-declaration": {
+ "name": "meta.function.ts",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.ts"
},
- "6": {
- "name": "storage.type.ts"
+ "2": {
+ "name": "storage.modifier.async.ts"
},
- "7": {
- "name": "entity.name.function.ts"
+ "3": {
+ "name": "storage.type.function.ts"
+ },
+ "4": {
+ "name": "keyword.generator.asterisk.ts"
},
- "8": {
- "name": "keyword.operator.ts"
+ "5": {
+ "name": "meta.definition.function.ts entity.name.function.ts"
}
},
- "match": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
- "name": "meta.method.overload.declaration.ts"
+ "end": "(?=$|^|;)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
},
- "new-expr": {
- "begin": "\\b(new)\\b",
+ "function-expression": {
+ "name": "meta.function.expression.ts",
+ "begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
"beginCaptures": {
"1": {
- "name": "keyword.others.ts"
+ "name": "storage.modifier.async.ts"
+ },
+ "2": {
+ "name": "storage.type.function.ts"
+ },
+ "3": {
+ "name": "keyword.generator.asterisk.ts"
+ },
+ "4": {
+ "name": "meta.definition.function.ts entity.name.function.ts"
}
},
- "end": "(?=[(;]|$)",
- "name": "new.expr.ts",
+ "end": "(?<=\\})",
"patterns": [
{
- "include": "#type"
+ "include": "#comment"
},
{
- "include": "#comment"
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
}
]
},
- "null-literal": {
- "match": "\\b(null)\\b",
- "name": "constant.language.null.ts"
- },
- "numeric-literal": {
- "match": "\\b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(0(o|O)[0-7]+)|(0(b|B)(0|1)+)|(([0-9]+(\\.[0-9]+)?))([eE]([+-]?)[0-9]+(\\.[0-9]+)?)?)\\b",
- "name": "constant.numeric.ts"
+ "object-literal": {
+ "name": "meta.objectliteral.ts",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-member"
+ }
+ ]
},
- "object-body": {
+ "decl-block": {
+ "name": "meta.block.ts",
"begin": "\\{",
"beginCaptures": {
"0": {
- "name": "meta.brace.curly.ts"
+ "name": "punctuation.definition.block.ts"
}
},
"end": "\\}",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.ts"
+ "name": "punctuation.definition.block.ts"
}
},
- "name": "meta.object.body.ts",
"patterns": [
{
- "include": "#string"
- },
+ "include": "#statements"
+ }
+ ]
+ },
+ "after-operator-block": {
+ "name": "meta.objectliteral.ts",
+ "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-member"
+ }
+ ]
+ },
+ "parameter-name": {
+ "patterns": [
+ {
+ "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.ts"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.ts"
+ },
+ "2": {
+ "name": "keyword.operator.rest.ts"
+ },
+ "3": {
+ "name": "entity.name.function.ts variable.language.this.ts"
+ },
+ "4": {
+ "name": "entity.name.function.ts"
+ },
+ "5": {
+ "name": "keyword.operator.optional.ts"
+ }
+ }
+ },
+ {
+ "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:((?<!\\.|\\$)\\bthis\\b(?!\\.|\\$))|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.ts"
+ },
+ "2": {
+ "name": "keyword.operator.rest.ts"
+ },
+ "3": {
+ "name": "variable.parameter.ts variable.language.this.ts"
+ },
+ "4": {
+ "name": "variable.parameter.ts"
+ },
+ "5": {
+ "name": "keyword.operator.optional.ts"
+ }
+ }
+ }
+ ]
+ },
+ "destructuring-parameter": {
+ "patterns": [
+ {
+ "name": "meta.parameter.object-binding-pattern.ts",
+ "begin": "(?<!=|:)\\s*(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.binding-pattern.object.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-object-binding-element"
+ }
+ ]
+ },
+ {
+ "name": "meta.paramter.array-binding-pattern.ts",
+ "begin": "(?<!=|:)\\s*(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.binding-pattern.array.ts"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-binding-element"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ }
+ ]
+ },
+ "parameter-object-binding-element": {
+ "patterns": [
{
"include": "#comment"
},
{
- "include": "#field-declaration"
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#object-binding-element-propertyName"
+ },
+ {
+ "include": "#parameter-binding-element"
+ }
+ ]
},
{
- "include": "#method-declaration"
+ "include": "#parameter-object-binding-pattern"
},
{
- "include": "#indexer-declaration"
+ "include": "#destructuring-parameter-rest"
},
{
- "include": "#type-annotation"
+ "include": "#variable-initializer"
},
{
- "include": "#variable-initializer"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "parameter-binding-element": {
+ "patterns": [
+ {
+ "include": "#comment"
},
{
- "include": "#access-modifier"
+ "include": "#parameter-object-binding-pattern"
},
{
- "include": "#static-modifier"
+ "include": "#parameter-array-binding-pattern"
},
{
- "include": "#property-accessor"
+ "include": "#destructuring-parameter-rest"
+ },
+ {
+ "include": "#variable-initializer"
}
]
},
- "object-declaration": {
- "begin": "\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?<!\\.)(class|interface)\\b",
- "beginCaptures": {
+ "destructuring-parameter-rest": {
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
"1": {
- "name": "storage.type.ts"
+ "name": "keyword.operator.rest.ts"
},
"2": {
- "name": "storage.modifier.ts"
+ "name": "variable.parameter.ts"
+ }
+ }
+ },
+ "parameter-object-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.ts"
},
- "3": {
- "name": "storage.type.ts"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.object.ts"
}
},
- "end": "(?<=\\})",
+ "end": "\\}",
"endCaptures": {
- "1": {
- "name": "brace.curly.ts"
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.ts"
}
},
- "name": "meta.declaration.object.ts",
"patterns": [
{
- "include": "#comment"
- },
- {
- "include": "#object-heritage"
- },
- {
- "include": "#object-name"
- },
- {
- "include": "#type-parameters"
- },
- {
- "include": "#object-body"
+ "include": "#parameter-object-binding-element"
}
]
},
- "object-heritage": {
- "begin": "(?:\\b(extends|implements)\\b)",
+ "parameter-array-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
"beginCaptures": {
"1": {
- "name": "keyword.other.ts"
+ "name": "keyword.operator.rest.ts"
+ },
+ "2": {
+ "name": "punctuation.definition.binding-pattern.array.ts"
}
},
- "end": "(?=\\{)",
+ "end": "\\]",
"endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-binding-element"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "return-type": {
+ "name": "meta.return.type.ts",
+ "begin": "(?<=\\))\\s*(:)",
+ "beginCaptures": {
"1": {
- "name": "brace.curly.ts"
+ "name": "keyword.operator.type.annotation.ts"
}
},
- "name": "meta.object.heritage.ts",
+ "end": "(?<![:|&])(?=$|^|[{};,]|//)",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#object-heritage"
+ "begin": "(?<=[:])(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "include": "#type-parameters"
+ "include": "#type-predicate-operator"
},
{
- "include": "#object-heritage-type"
+ "include": "#type"
}
]
},
- "object-heritage-type": {
- "captures": {
- "1": {
- "name": "support.type.ts"
+ "type-predicate-operator": {
+ "name": "keyword.operator.expression.is.ts",
+ "match": "(?<!\\.|\\$)\\bis\\b(?!\\$|\\.)"
+ },
+ "type-annotation": {
+ "name": "meta.type.annotation.ts",
+ "begin": ":",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.annotation.ts"
}
},
- "match": "(?:\\b([a-zA-Z_$][\\w$]*)\\b)",
- "name": "meta.object.heritage.parent.ts"
- },
- "object-member": {
- "begin": "[a-zA-Z_$][\\w$]*\\s*:",
- "end": "(?=,|\\})",
- "name": "meta.object.member.ts",
+ "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
- "include": "#expression"
+ "include": "#comment"
+ },
+ {
+ "include": "#type"
}
]
},
- "object-name": {
- "captures": {
- "0": {
- "name": "entity.name.class.ts"
- }
- },
- "match": "[a-zA-Z_$][\\w$]*",
- "name": "meta.object.name.ts"
- },
- "parameter-name": {
- "captures": {
- "1": {
- "name": "storage.modifier.ts"
+ "type": {
+ "patterns": [
+ {
+ "include": "#comment"
},
- "2": {
- "name": "keyword.others.ts"
+ {
+ "include": "#string"
},
- "3": {
- "name": "variable.parameter.ts"
+ {
+ "include": "#numeric-literal"
},
- "4": {
- "name": "keyword.others.ts"
+ {
+ "include": "#type-primitive"
+ },
+ {
+ "include": "#type-builtin-literals"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#type-tuple"
+ },
+ {
+ "include": "#type-object"
+ },
+ {
+ "include": "#type-operators"
+ },
+ {
+ "include": "#type-fn-type-parameters"
+ },
+ {
+ "include": "#type-paren-or-function-parameters"
+ },
+ {
+ "include": "#type-function-return-type"
+ },
+ {
+ "include": "#type-name"
}
- },
- "match": "(?:\\s*\\b(public|private|protected)\\b\\s+)?(\\.\\.\\.)?\\s*([a-zA-Z_$][\\w$]*)\\s*(\\??)",
- "name": "parameter.name.ts"
+ ]
},
- "paren-expression": {
+ "function-parameters": {
+ "name": "meta.parameters.ts",
"begin": "\\(",
"beginCaptures": {
"0": {
- "name": "meta.brace.paren.ts"
+ "name": "punctuation.definition.parameters.begin.ts"
}
},
"end": "\\)",
"endCaptures": {
"0": {
- "name": "meta.brace.paren.ts"
+ "name": "punctuation.definition.parameters.end.ts"
}
},
"patterns": [
{
- "include": "#expression"
+ "include": "#comment"
+ },
+ {
+ "include": "#decorator"
+ },
+ {
+ "include": "#destructuring-parameter"
+ },
+ {
+ "include": "#parameter-name"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "name": "punctuation.separator.parameter.ts",
+ "match": ","
}
]
},
- "property-accessor": {
- "match": "\\b(get|set)\\b",
- "name": "storage.type.property.ts"
+ "type-primitive": {
+ "name": "support.type.primitive.ts",
+ "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$|\\.)"
},
- "qstring-double": {
- "begin": "\"",
- "end": "\"|(?:[^\\\\\\n]$)",
- "name": "string.double.ts",
+ "type-builtin-literals": {
+ "name": "support.type.builtin.ts",
+ "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null|object)\\b(?!\\$|\\.)"
+ },
+ "type-paren-or-function-parameters": {
+ "name": "meta.type.paren.cover.ts",
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.brace.round.ts"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.ts"
+ }
+ },
"patterns": [
{
- "include": "#string-character-escape"
+ "include": "#type"
+ },
+ {
+ "include": "#function-parameters"
}
]
},
- "qstring-single": {
- "begin": "'",
- "end": "\\'|(?:[^\\\\\\n]$)",
- "name": "string.single.ts",
+ "type-fn-type-parameters": {
"patterns": [
{
- "include": "#string-character-escape"
+ "name": "meta.type.constructor.ts",
+ "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.new.ts"
+ }
+ }
+ },
+ {
+ "name": "meta.type.constructor.ts",
+ "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.new.ts"
+ }
+ },
+ "end": "(?<=\\))",
+ "patterns": [
+ {
+ "include": "#function-parameters"
+ }
+ ]
+ },
+ {
+ "name": "meta.type.function.ts",
+ "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
+ "end": "(?<=\\))",
+ "patterns": [
+ {
+ "include": "#function-parameters"
+ }
+ ]
}
]
},
- "regex": {
- "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
- "end": "$|(/)[igm]*",
- "name": "string.regex.ts",
+ "type-operators": {
"patterns": [
{
- "match": "\\\\.",
- "name": "constant.character.escape.ts"
+ "include": "#typeof-operator"
+ },
+ {
+ "begin": "([&|])(?=\\s*\\{)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.ts"
+ }
+ },
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "match": "\\[(\\\\\\]|[^\\]])*\\]",
- "name": "constant.character.class.ts"
+ "begin": "[&|]",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.ts"
+ }
+ },
+ "end": "(?=\\S)"
+ },
+ {
+ "name": "keyword.operator.expression.keyof.ts",
+ "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$|\\.)"
}
]
},
- "relational-operator": {
- "match": "===|!==|==|!=|<=|>=|<>|=|<|>",
- "name": "keyword.operator.comparison.ts"
- },
- "return-type": {
- "begin": "(?<=\\))\\s*:",
- "end": "(?=$)|(?=\\{|;|//)",
- "name": "meta.return.type.ts",
+ "type-function-return-type": {
+ "name": "meta.type.function.return.ts",
+ "begin": "=>",
+ "beginCaptures": {
+ "0": {
+ "name": "storage.type.function.arrow.ts"
+ }
+ },
+ "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
+ "begin": "(?<==>)(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
+ },
+ {
+ "include": "#type-predicate-operator"
+ },
+ {
"include": "#type"
}
]
},
- "static-modifier": {
- "match": "\\b(static)\\b",
- "name": "keyword.other.ts"
- },
- "storage-keyword": {
- "match": "\\b(var|let|function|const|module|namespace|void|export)\\b",
- "name": "storage.type.ts"
- },
- "string": {
- "name": "string.ts",
+ "type-tuple": {
+ "name": "meta.type.tuple.ts",
+ "begin": "\\[",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.brace.square.ts"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.square.ts"
+ }
+ },
"patterns": [
{
- "include": "#qstring-single"
+ "include": "#type"
},
{
- "include": "#qstring-double"
+ "include": "#punctuation-comma"
}
]
},
- "string-character-escape": {
- "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
- "name": "constant.character.escape"
- },
- "switch-block": {
- "begin": "{",
- "end": "(?=\\})",
- "name": "switch-block.expr.ts",
+ "type-name": {
"patterns": [
{
- "include": "#expression"
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ }
+ }
+ },
+ {
+ "name": "entity.name.type.ts",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
}
]
},
- "switch-expression": {
- "begin": "\\b(switch)\\b\\s*\\(",
+ "type-parameters": {
+ "name": "meta.type.parameters.ts",
+ "begin": "(<)",
"beginCaptures": {
"1": {
- "name": "keyword.control.ts"
+ "name": "punctuation.definition.typeparameters.begin.ts"
+ }
+ },
+ "end": "(>)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.typeparameters.end.ts"
}
},
- "end": "\\)",
- "name": "switch-expression.expr.ts",
"patterns": [
{
- "include": "#expression"
+ "include": "#comment"
+ },
+ {
+ "name": "storage.modifier.ts",
+ "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
+ },
+ {
+ "name": "keyword.operator.assignment.ts",
+ "match": "\\=(?!>)"
+ },
+ {
+ "include": "#type"
+ },
+ {
+ "include": "#punctuation-comma"
}
]
},
- "switch-statement": {
- "begin": "(?=\\bswitch\\b\\s*\\()",
- "end": "}",
- "name": "switch-statement.expr.ts",
+ "variable-initializer": {
"patterns": [
{
- "include": "#switch-expression"
- },
- {
- "include": "#switch-block"
+ "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.ts"
+ }
+ },
+ "end": "(?=$|^|[,);}\\]])",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "begin": "(?<!=|!)(=)(?!=)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.ts"
+ }
+ },
+ "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
}
]
},
- "template": {
- "begin": "`",
+ "for-loop": {
+ "begin": "(?<!\\.|\\$)\\b(for)(?:\\s+(await))?\\s*(\\()",
"beginCaptures": {
- "0": {
- "name": "string.template.ts"
+ "1": {
+ "name": "keyword.control.loop.ts"
+ },
+ "2": {
+ "name": "keyword.control.loop.ts"
+ },
+ "3": {
+ "name": "meta.brace.round.ts"
}
},
- "end": "`",
+ "end": "\\)",
"endCaptures": {
"0": {
- "name": "string.template.ts"
+ "name": "meta.brace.round.ts"
}
},
- "name": "meta.template.ts",
"patterns": [
{
- "include": "#template-substitution-element"
+ "include": "#var-expr"
},
{
- "include": "#template-string-contents"
+ "include": "#expression"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "template-string-contents": {
- "begin": ".*?",
- "end": "(?=(\\$\\{|`))",
- "name": "string.template.ts",
+ "switch-expression": {
+ "name": "switch-expression.expr.ts",
+ "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.switch.ts"
+ },
+ "2": {
+ "name": "meta.brace.round.ts"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.ts"
+ }
+ },
"patterns": [
{
- "include": "#string-character-escape"
+ "include": "#expression"
}
]
},
- "template-substitution-element": {
- "begin": "\\$\\{",
+ "switch-block": {
+ "name": "switch-block.expr.ts",
+ "begin": "\\{",
"beginCaptures": {
"0": {
- "name": "keyword.others.ts"
+ "name": "punctuation.definition.block.ts"
}
},
- "end": "\\}",
+ "end": "(?=\\})",
+ "patterns": [
+ {
+ "include": "#case-clause"
+ },
+ {
+ "include": "#statements"
+ }
+ ]
+ },
+ "case-clause": {
+ "name": "case-clause.expr.ts",
+ "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$|\\.)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.switch.ts"
+ }
+ },
+ "end": ":",
"endCaptures": {
"0": {
- "name": "keyword.others.ts"
+ "name": "punctuation.definition.section.case-statement.ts"
}
},
- "name": "template.element.ts",
"patterns": [
{
"include": "#expression"
}
]
},
- "ternary-expression": {
- "begin": "(?=\\?)",
- "end": "(?=$|[;,])",
+ "switch-statement": {
+ "name": "switch-statement.expr.ts",
+ "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.ts"
+ }
+ },
"patterns": [
{
- "include": "#ternary-operator"
+ "include": "#switch-expression"
},
{
- "include": "#expression-type"
+ "include": "#switch-block"
}
]
},
- "ternary-operator": {
- "begin": "(\\?)",
- "end": "(:)",
+ "support-objects": {
"patterns": [
{
- "include": "#expression-type"
+ "name": "variable.language.arguments.ts",
+ "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
+ },
+ {
+ "name": "support.class.builtin.ts",
+ "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
+ },
+ {
+ "name": "support.class.error.ts",
+ "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
+ },
+ {
+ "name": "support.function.ts",
+ "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\() "
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.constant.math.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ },
+ "3": {
+ "name": "support.function.math.ts"
+ },
+ "4": {
+ "name": "support.constant.property.math.ts"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.class.console.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ },
+ "3": {
+ "name": "support.function.console.ts"
+ }
+ }
+ },
+ {
+ "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.constant.json.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ },
+ "3": {
+ "name": "support.function.json.ts"
+ }
+ }
+ },
+ {
+ "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "support.variable.property.ts"
+ },
+ "3": {
+ "name": "support.constant.ts"
+ }
+ }
+ },
+ {
+ "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.variable.dom.ts"
+ },
+ "2": {
+ "name": "support.class.dom.ts"
+ }
+ }
+ },
+ {
+ "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "support.constant.dom.ts"
+ },
+ "3": {
+ "name": "support.variable.property.dom.ts"
+ }
+ }
+ },
+ {
+ "name": "support.class.node.ts",
+ "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.variable.object.process.ts"
+ },
+ "2": {
+ "name": "punctuation.accessor.ts"
+ },
+ "3": {
+ "name": "support.variable.property.process.ts"
+ },
+ "4": {
+ "name": "support.function.process.ts"
+ }
+ }
+ },
+ {
+ "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.type.object.module.ts"
+ },
+ "2": {
+ "name": "support.type.object.module.ts"
+ },
+ "3": {
+ "name": "punctuation.accessor.ts"
+ },
+ "4": {
+ "name": "support.type.object.module.ts"
+ }
+ }
+ },
+ {
+ "name": "support.variable.object.node.ts",
+ "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
+ },
+ {
+ "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "support.function.event-handler.ts"
+ },
+ "3": {
+ "name": "support.function.ts"
+ },
+ "4": {
+ "name": "support.function.dom.ts"
+ }
+ }
}
]
},
- "this-literal": {
- "match": "\\b(this)\\b",
- "name": "constant.language.this.ts"
- },
- "type": {
- "name": "meta.type.ts",
+ "function-call": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
"patterns": [
{
- "include": "#type-primitive"
+ "name": "meta.function-call.ts",
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
+ "end": "(?=\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "patterns": [
+ {
+ "include": "#literal"
+ },
+ {
+ "include": "#support-objects"
+ },
+ {
+ "include": "#object-identifiers"
+ },
+ {
+ "include": "#punctuation-accessor"
+ },
+ {
+ "name": "entity.name.function.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ }
+ ]
},
{
- "include": "#type-parameters"
+ "include": "#comment"
},
{
- "include": "#type-tuple"
+ "name": "meta.type.parameters.ts",
+ "begin": "\\<",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.typeparameters.begin.ts"
+ }
+ },
+ "end": "\\>",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.typeparameters.end.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
},
{
- "include": "#type-object"
+ "include": "#paren-expression"
+ }
+ ]
+ },
+ "identifiers": {
+ "patterns": [
+ {
+ "include": "#object-identifiers"
},
{
- "include": "#type-operator"
+ "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n))",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "entity.name.function.ts"
+ }
+ }
},
{
- "include": "#type-paren-or-function-type-parameters"
+ "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "variable.other.constant.property.ts"
+ }
+ }
},
{
- "include": "#type-function-return-type"
+ "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "variable.other.property.ts"
+ }
+ }
},
{
- "include": "#type-name"
+ "name": "variable.other.constant.ts",
+ "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
+ },
+ {
+ "name": "variable.other.readwrite.ts",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
}
]
},
- "type-annotation": {
- "begin": ":",
- "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[a-zA-Z_$])\\s*(?=\\{)",
- "name": "meta.type.annotation.ts",
+ "object-identifiers": {
+ "patterns": [
+ {
+ "name": "support.class.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
+ },
+ {
+ "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.ts"
+ },
+ "2": {
+ "name": "variable.other.constant.object.property.ts"
+ },
+ "3": {
+ "name": "variable.other.object.property.ts"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "variable.other.constant.object.ts"
+ },
+ "2": {
+ "name": "variable.other.object.ts"
+ }
+ }
+ }
+ ]
+ },
+ "cast": {
+ "patterns": [
+ {
+ "name": "cast.expr.ts",
+ "begin": "(?:(?<=return|throw|yield|await|default|[=(,:>*?]))\\s*(<)(?!<?\\=)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.brace.angle.ts"
+ }
+ },
+ "end": "(\\>)\\s*",
+ "endCaptures": {
+ "1": {
+ "name": "meta.brace.angle.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "name": "cast.expr.ts",
+ "begin": "(?:(?<=^))\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*>)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.brace.angle.ts"
+ }
+ },
+ "end": "(\\>)\\s*",
+ "endCaptures": {
+ "1": {
+ "name": "meta.brace.angle.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ }
+ ]
+ },
+ "new-expr": {
+ "name": "new.expr.ts",
+ "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$|\\.)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.new.ts"
+ }
+ },
+ "end": "(?<=\\))|(?=[;),}]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$|\\.))|((?<!\\.|\\$)\\bfunction((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
"patterns": [
{
- "include": "#expression-operator"
+ "include": "#paren-expression"
+ },
+ {
+ "include": "#class-or-interface-declaration"
},
{
"include": "#type"
+ }
+ ]
+ },
+ "object-member": {
+ "patterns": [
+ {
+ "include": "#comment"
},
{
- "include": "#string"
+ "include": "#object-literal-method-declaration"
+ },
+ {
+ "name": "meta.object.member.ts",
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "name": "meta.object-literal.key.ts",
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
+ "end": ":",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.separator.key-value.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ }
+ ]
+ },
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.ts",
+ "begin": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(:)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.ts"
+ },
+ "1": {
+ "name": "constant.numeric.decimal.ts"
+ },
+ "2": {
+ "name": "punctuation.separator.key-value.ts"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.ts",
+ "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n)))",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.ts"
+ },
+ "1": {
+ "name": "entity.name.function.ts"
+ },
+ "2": {
+ "name": "punctuation.separator.key-value.ts"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.ts",
+ "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.ts"
+ },
+ "1": {
+ "name": "punctuation.separator.key-value.ts"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.ts",
+ "begin": "\\.\\.\\.",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.spread.ts"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.ts",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
+ "captures": {
+ "1": {
+ "name": "variable.other.readwrite.ts"
+ }
+ }
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "expression-operators": {
+ "patterns": [
+ {
+ "name": "keyword.control.flow.ts",
+ "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$|\\.)"
},
{
- "include": "#comment"
+ "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$|\\.)(?:\\s*(\\*))?",
+ "captures": {
+ "1": {
+ "name": "keyword.control.flow.ts"
+ },
+ "2": {
+ "name": "keyword.generator.asterisk.ts"
+ }
+ }
+ },
+ {
+ "name": "keyword.operator.expression.delete.ts",
+ "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.in.ts",
+ "match": "(?<!\\.|\\$)\\bin\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.of.ts",
+ "match": "(?<!\\.|\\$)\\bof\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.instanceof.ts",
+ "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.new.ts",
+ "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$|\\.)"
+ },
+ {
+ "include": "#typeof-operator"
+ },
+ {
+ "name": "keyword.operator.expression.void.ts",
+ "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$|\\.)"
+ },
+ {
+ "begin": "(?<!\\.|\\$)\\b(as)\\s+",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.as.ts"
+ }
+ },
+ "end": "(?=$|^|[;,:})\\]])",
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "name": "keyword.operator.spread.ts",
+ "match": "\\.\\.\\."
+ },
+ {
+ "name": "keyword.operator.assignment.compound.ts",
+ "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
+ },
+ {
+ "name": "keyword.operator.assignment.compound.bitwise.ts",
+ "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
+ },
+ {
+ "name": "keyword.operator.bitwise.shift.ts",
+ "match": "<<|>>>|>>"
+ },
+ {
+ "name": "keyword.operator.comparison.ts",
+ "match": "===|!==|==|!="
+ },
+ {
+ "name": "keyword.operator.relational.ts",
+ "match": "<=|>=|<>|<|>"
+ },
+ {
+ "name": "keyword.operator.logical.ts",
+ "match": "\\!|&&|\\|\\|"
+ },
+ {
+ "name": "keyword.operator.bitwise.ts",
+ "match": "\\&|~|\\^|\\|"
+ },
+ {
+ "name": "keyword.operator.assignment.ts",
+ "match": "\\="
+ },
+ {
+ "name": "keyword.operator.decrement.ts",
+ "match": "--"
+ },
+ {
+ "name": "keyword.operator.increment.ts",
+ "match": "\\+\\+"
+ },
+ {
+ "name": "keyword.operator.arithmetic.ts",
+ "match": "%|\\*|/|-|\\+"
+ },
+ {
+ "match": "(?<=[_$[:alnum:])])\\s*(/)(?![/*])",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.arithmetic.ts"
+ }
+ }
}
]
},
- "type-declaration": {
- "begin": "\\b(type)\\b\\s+([a-zA-Z_$][\\w$]*)\\s*",
+ "typeof-operator": {
+ "name": "keyword.operator.expression.typeof.ts",
+ "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$|\\.)"
+ },
+ "arrow-function": {
+ "patterns": [
+ {
+ "name": "meta.arrow.ts",
+ "match": "(?:(?<!\\.|\\$)(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.async.ts"
+ },
+ "2": {
+ "name": "variable.parameter.ts"
+ }
+ }
+ },
+ {
+ "name": "meta.arrow.ts",
+ "begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.async.ts"
+ }
+ },
+ "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#arrow-return-type"
+ }
+ ]
+ },
+ {
+ "name": "meta.arrow.ts",
+ "begin": "=>",
+ "beginCaptures": {
+ "0": {
+ "name": "storage.type.function.arrow.ts"
+ }
+ },
+ "end": "(?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S))",
+ "patterns": [
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#expression"
+ }
+ ]
+ }
+ ]
+ },
+ "arrow-return-type": {
+ "name": "meta.return.type.arrow.ts",
+ "begin": "(?<=\\))\\s*(:)",
"beginCaptures": {
"1": {
- "name": "keyword.other.ts"
- },
- "2": {
- "name": "entity.name.class.ts"
+ "name": "keyword.operator.type.annotation.ts"
}
},
- "end": "(?=$|[,);>]|var|type|function|class|interface)",
- "name": "meta.type.declaration.ts",
+ "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
"patterns": [
{
- "include": "#type-parameters"
+ "begin": "(?<=[:])(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "include": "#type"
+ "include": "#type-predicate-operator"
},
{
- "match": "=\\s*",
- "name": "keyword.operator.comparison.ts"
+ "include": "#type"
}
]
},
- "type-function-return-type": {
- "begin": "=>",
+ "punctuation-comma": {
+ "name": "punctuation.separator.comma.ts",
+ "match": ","
+ },
+ "punctuation-semicolon": {
+ "name": "punctuation.terminator.statement.ts",
+ "match": ";"
+ },
+ "punctuation-accessor": {
+ "name": "punctuation.accessor.ts",
+ "match": "\\."
+ },
+ "paren-expression": {
+ "begin": "\\(",
"beginCaptures": {
"0": {
- "name": "keyword.operator.ts"
+ "name": "meta.brace.round.ts"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.ts"
}
},
- "end": "(?=\\s*[,\\)\\{=;>]|//|$)",
- "name": "meta.type.function.return.ts",
"patterns": [
{
- "include": "#type"
+ "include": "#expression"
+ },
+ {
+ "include": "#punctuation-comma"
}
]
},
- "type-name": {
- "captures": {
+ "qstring-double": {
+ "name": "string.quoted.double.ts",
+ "begin": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.ts"
+ }
+ },
+ "end": "(\")|((?:[^\\\\\\n])$)",
+ "endCaptures": {
"1": {
- "name": "entity.name.type.ts"
+ "name": "punctuation.definition.string.end.ts"
+ },
+ "2": {
+ "name": "invalid.illegal.newline.ts"
}
},
- "match": "[a-zA-Z_$][.\\w$]*",
- "name": "meta.type.name.ts"
+ "patterns": [
+ {
+ "include": "#string-character-escape"
+ }
+ ]
},
- "type-object": {
- "begin": "\\{",
+ "qstring-single": {
+ "name": "string.quoted.single.ts",
+ "begin": "'",
"beginCaptures": {
"0": {
- "name": "meta.brace.curly.ts"
+ "name": "punctuation.definition.string.begin.ts"
}
},
- "end": "\\}",
+ "end": "(\\')|((?:[^\\\\\\n])$)",
"endCaptures": {
- "0": {
- "name": "meta.brace.curly.ts"
+ "1": {
+ "name": "punctuation.definition.string.end.ts"
+ },
+ "2": {
+ "name": "invalid.illegal.newline.ts"
}
},
- "name": "meta.object.type.ts",
"patterns": [
{
- "include": "#comment"
- },
+ "include": "#string-character-escape"
+ }
+ ]
+ },
+ "regex": {
+ "patterns": [
{
- "include": "#field-declaration"
+ "name": "string.regexp.ts",
+ "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.begin.ts"
+ }
+ },
+ "end": "(/)([gimuy]*)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.ts"
+ },
+ "2": {
+ "name": "keyword.other.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
+ },
+ {
+ "name": "string.regexp.ts",
+ "begin": "(?<![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.ts"
+ }
+ },
+ "end": "(/)([gimuy]*)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.ts"
+ },
+ "2": {
+ "name": "keyword.other.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
+ }
+ ]
+ },
+ "regexp": {
+ "patterns": [
+ {
+ "name": "keyword.control.anchor.regexp",
+ "match": "\\\\[bB]|\\^|\\$"
+ },
+ {
+ "name": "keyword.other.back-reference.regexp",
+ "match": "\\\\[1-9]\\d*"
+ },
+ {
+ "name": "keyword.operator.quantifier.regexp",
+ "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
+ },
+ {
+ "name": "keyword.operator.or.regexp",
+ "match": "\\|"
+ },
+ {
+ "name": "meta.group.assertion.regexp",
+ "begin": "(\\()((\\?=)|(\\?!))",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.group.regexp"
+ },
+ "2": {
+ "name": "punctuation.definition.group.assertion.regexp"
+ },
+ "3": {
+ "name": "meta.assertion.look-ahead.regexp"
+ },
+ "4": {
+ "name": "meta.assertion.negative-look-ahead.regexp"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.group.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
+ },
+ {
+ "name": "meta.group.regexp",
+ "begin": "\\((\\?:)?",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.group.regexp"
+ },
+ "1": {
+ "name": "punctuation.definition.group.capture.regexp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.group.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
+ },
+ {
+ "name": "constant.other.character-class.set.regexp",
+ "begin": "(\\[)(\\^)?",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.character-class.regexp"
+ },
+ "2": {
+ "name": "keyword.operator.negation.regexp"
+ }
+ },
+ "end": "(\\])",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.character-class.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "constant.other.character-class.range.regexp",
+ "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
+ "captures": {
+ "1": {
+ "name": "constant.character.numeric.regexp"
+ },
+ "2": {
+ "name": "constant.character.control.regexp"
+ },
+ "3": {
+ "name": "constant.character.escape.backslash.regexp"
+ },
+ "4": {
+ "name": "constant.character.numeric.regexp"
+ },
+ "5": {
+ "name": "constant.character.control.regexp"
+ },
+ "6": {
+ "name": "constant.character.escape.backslash.regexp"
+ }
+ }
+ },
+ {
+ "include": "#regex-character-class"
+ }
+ ]
+ },
+ {
+ "include": "#regex-character-class"
+ }
+ ]
+ },
+ "regex-character-class": {
+ "patterns": [
+ {
+ "name": "constant.other.character-class.regexp",
+ "match": "\\\\[wWsSdDtrnvf]|\\."
},
{
- "include": "#method-declaration"
+ "name": "constant.character.numeric.regexp",
+ "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
},
{
- "include": "#indexer-declaration"
+ "name": "constant.character.control.regexp",
+ "match": "\\\\c[A-Z]"
},
{
- "include": "#type-annotation"
+ "name": "constant.character.escape.backslash.regexp",
+ "match": "\\\\."
}
]
},
- "type-operator": {
- "match": "[.|]",
- "name": "keyword.operator.type.ts"
+ "string": {
+ "patterns": [
+ {
+ "include": "#qstring-single"
+ },
+ {
+ "include": "#qstring-double"
+ }
+ ]
},
- "type-parameters": {
- "begin": "([a-zA-Z_$][\\w$]*)?(<)",
+ "template": {
+ "name": "string.template.ts",
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
"beginCaptures": {
"1": {
- "name": "entity.name.type.ts"
+ "name": "entity.name.function.tagged-template.ts"
},
"2": {
- "name": "meta.brace.angle.ts"
+ "name": "punctuation.definition.string.template.begin.ts"
}
},
- "end": "(?=$)|(>)",
+ "end": "`",
"endCaptures": {
- "2": {
- "name": "meta.brace.angle.ts"
+ "0": {
+ "name": "punctuation.definition.string.template.end.ts"
}
},
- "name": "meta.type.parameters.ts",
"patterns": [
{
- "match": "\\b(extends)\\b",
- "name": "keyword.other.ts"
- },
- {
- "include": "#comment"
+ "include": "#template-substitution-element"
},
{
- "include": "#type"
+ "include": "#string-character-escape"
}
]
},
- "type-paren-or-function-type-parameters": {
- "begin": "(?:\\b(new)\\b)?\\s*\\(",
+ "string-character-escape": {
+ "name": "constant.character.escape.ts",
+ "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
+ },
+ "template-substitution-element": {
+ "name": "meta.template.expression.ts",
+ "begin": "\\$\\{",
"beginCaptures": {
- "1": {
- "name": "keyword.control.ts"
+ "0": {
+ "name": "punctuation.definition.template-expression.begin.ts"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.template-expression.end.ts"
}
},
- "end": "\\)",
- "name": "meta.type.paren.cover.ts",
"patterns": [
{
- "include": "#comment"
+ "include": "#expression"
+ }
+ ]
+ },
+ "literal": {
+ "patterns": [
+ {
+ "include": "#numeric-literal"
},
{
- "include": "#type"
+ "include": "#boolean-literal"
+ },
+ {
+ "include": "#null-literal"
+ },
+ {
+ "include": "#undefined-literal"
+ },
+ {
+ "include": "#numericConstant-literal"
},
{
- "include": "#function-type-parameters"
+ "include": "#array-literal"
+ },
+ {
+ "include": "#this-literal"
+ },
+ {
+ "include": "#super-literal"
}
]
},
- "type-primitive": {
- "captures": {
- "1": {
- "name": "support.type.ts"
- }
- },
- "match": "\\b(string|number|boolean|symbol|any|void)\\b",
- "name": "meta.type.primitive.ts"
- },
- "type-tuple": {
+ "array-literal": {
+ "name": "meta.array.literal.ts",
"begin": "\\[",
"beginCaptures": {
"0": {
@@ -1212,81 +3307,667 @@
"name": "meta.brace.square.ts"
}
},
- "name": "meta.type.tuple.ts",
"patterns": [
{
- "include": "#type"
+ "include": "#expression"
},
{
- "include": "#comment"
+ "include": "#punctuation-comma"
}
]
},
- "undefined-literal": {
- "match": "\\b(undefined)\\b",
- "name": "constant.language.ts"
+ "numeric-literal": {
+ "patterns": [
+ {
+ "name": "constant.numeric.hex.ts",
+ "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
+ },
+ {
+ "name": "constant.numeric.binary.ts",
+ "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
+ },
+ {
+ "name": "constant.numeric.octal.ts",
+ "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
+ },
+ {
+ "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
+ "captures": {
+ "0": {
+ "name": "constant.numeric.decimal.ts"
+ },
+ "1": {
+ "name": "meta.delimiter.decimal.period.ts"
+ },
+ "2": {
+ "name": "meta.delimiter.decimal.period.ts"
+ },
+ "3": {
+ "name": "meta.delimiter.decimal.period.ts"
+ },
+ "4": {
+ "name": "meta.delimiter.decimal.period.ts"
+ },
+ "5": {
+ "name": "meta.delimiter.decimal.period.ts"
+ },
+ "6": {
+ "name": "meta.delimiter.decimal.period.ts"
+ }
+ }
+ }
+ ]
},
- "var-expr": {
- "begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\b",
- "beginCaptures": {
- "1": {
- "name": "storage.type.ts"
+ "boolean-literal": {
+ "patterns": [
+ {
+ "name": "constant.language.boolean.true.ts",
+ "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
+ },
+ {
+ "name": "constant.language.boolean.false.ts",
+ "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
}
- },
- "end": "(?=$|;)",
- "name": "meta.var.expr.ts",
+ ]
+ },
+ "null-literal": {
+ "name": "constant.language.null.ts",
+ "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
+ },
+ "this-literal": {
+ "name": "variable.language.this.ts",
+ "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
+ },
+ "super-literal": {
+ "name": "variable.language.super.ts",
+ "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
+ },
+ "undefined-literal": {
+ "name": "constant.language.undefined.ts",
+ "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
+ },
+ "numericConstant-literal": {
"patterns": [
{
- "include": "#var-single-variable"
+ "name": "constant.language.nan.ts",
+ "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
},
{
- "include": "#comment"
+ "name": "constant.language.infinity.ts",
+ "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
}
]
},
- "var-single-variable": {
- "begin": "\\b([a-zA-Z_$][\\w$]*)\\s*(=?)",
+ "access-modifier": {
+ "name": "storage.modifier.ts",
+ "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$|\\.)"
+ },
+ "property-accessor": {
+ "name": "storage.type.property.ts",
+ "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$|\\.)"
+ },
+ "comment": {
+ "patterns": [
+ {
+ "name": "comment.block.documentation.ts",
+ "begin": "/\\*\\*(?!/)",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.ts"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.ts"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#docblock"
+ }
+ ]
+ },
+ {
+ "name": "comment.block.ts",
+ "begin": "/\\*",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.ts"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.ts"
+ }
+ }
+ },
+ {
+ "begin": "(^[ \\t]+)?(//)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.leading.ts"
+ },
+ "2": {
+ "name": "comment.line.double-slash.ts punctuation.definition.comment.ts"
+ }
+ },
+ "end": "(?=^)",
+ "contentName": "comment.line.double-slash.ts"
+ }
+ ]
+ },
+ "directives": {
+ "name": "comment.line.triple-slash.directive.ts",
+ "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
"beginCaptures": {
"1": {
- "name": "variable.ts"
+ "name": "punctuation.definition.comment.ts"
}
},
- "end": "(?=$|[;,])",
- "name": "meta.var-single-variable.expr.ts",
+ "end": "(?=^)",
"patterns": [
{
- "include": "#ternary-expression"
- },
+ "name": "meta.tag.ts",
+ "begin": "(<)(reference|amd-dependency|amd-module)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.directive.ts"
+ },
+ "2": {
+ "name": "entity.name.tag.directive.ts"
+ }
+ },
+ "end": "/>",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.tag.directive.ts"
+ }
+ },
+ "patterns": [
+ {
+ "name": "entity.other.attribute-name.directive.ts",
+ "match": "path|types|no-default-lib|name"
+ },
+ {
+ "name": "keyword.operator.assignment.ts",
+ "match": "="
+ },
+ {
+ "include": "#string"
+ }
+ ]
+ }
+ ]
+ },
+ "docblock": {
+ "patterns": [
{
- "include": "#type-annotation"
- },
+ "match": "(?x)\n((@)access)\n\\s+\n(private|protected|public)\n\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "constant.language.access-type.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "5": {
+ "name": "constant.other.email.link.underline.jsdoc"
+ },
+ "6": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "4": {
+ "name": "keyword.operator.control.jsdoc"
+ },
+ "5": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "meta.example.jsdoc",
+ "begin": "((@)example)\\s+",
+ "end": "(?=@|\\*/)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "^\\s\\*\\s+"
+ },
+ {
+ "contentName": "constant.other.description.jsdoc",
+ "begin": "\\G(<)caption(>)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.tag.inline.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ },
+ "end": "(</)caption(>)|(?=\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "entity.name.tag.inline.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "[^\\s@*](?:[^*]|\\*[^/])*",
+ "captures": {
+ "0": {
+ "name": "source.embedded.ts"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "constant.language.symbol-type.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!https?://)\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.link.underline.jsdoc"
+ },
+ "4": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(?:\n ([A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]*) # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* (,) \\s*\n ([A-Za-z_$]\n [\\w$.\\[\\]]*)\n )*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.delimiter.object.comma.jsdoc"
+ },
+ "5": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "begin": "((@)typedef)\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ },
+ {
+ "name": "entity.name.type.instance.jsdoc",
+ "match": "(?:[^@\\s*/]|\\*[^/])+"
+ }
+ ]
+ },
+ {
+ "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ },
+ {
+ "name": "variable.other.jsdoc",
+ "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
+ },
+ {
+ "name": "variable.other.jsdoc",
+ "begin": "\\[",
+ "end": "\\]|(?=\\*/)",
+ "patterns": [
+ {
+ "match": "(=)((?:[^\\]*]|\\*[^/])*)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.assignment.jsdoc"
+ },
+ "2": {
+ "name": "source.embedded.ts"
+ }
+ }
+ },
+ {
+ "include": "#brackets"
+ },
+ {
+ "include": "#quotes"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "begin": "((@)(?:define|enum|exception|implements|modifies|namespace|private|protected|returns?|suppress|throws|type))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ }
+ ]
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "contentName": "variable.other.jsdoc",
+ "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.string.begin.jsdoc"
+ }
+ },
+ "end": "(\\3)|(?=$|\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "variable.other.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.string.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "storage.type.class.jsdoc",
+ "match": "(?x) (@) (?:abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|kind |lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace |noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve|private|prop |property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule |summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce) \\b",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ }
+ },
+ {
+ "include": "#inline-tags"
+ }
+ ]
+ },
+ "brackets": {
+ "patterns": [
{
- "include": "#string"
+ "begin": "{",
+ "end": "}|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
},
{
- "include": "#comment"
- },
+ "begin": "\\[",
+ "end": "\\]|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ },
+ "inline-tags": {
+ "patterns": [
{
- "include": "#expression"
+ "name": "constant.other.description.jsdoc",
+ "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.bracket.square.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.square.end.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "entity.name.type.instance.jsdoc",
+ "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.jsdoc"
+ },
+ "2": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "3": {
+ "name": "punctuation.definition.inline.tag.jsdoc"
+ }
+ },
+ "end": "}|(?=\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.bracket.curly.end.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
+ "captures": {
+ "1": {
+ "name": "variable.other.link.underline.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.separator.pipe.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
+ "captures": {
+ "1": {
+ "name": "variable.other.description.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.separator.pipe.jsdoc"
+ }
+ }
+ }
+ ]
}
]
},
- "variable-initializer": {
- "begin": "(=)",
- "beginCaptures": {
- "1": {
- "name": "keyword.operator.comparison.ts"
+ "quotes": {
+ "patterns": [
+ {
+ "begin": "'",
+ "end": "'|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#quotes"
+ }
+ ]
+ },
+ {
+ "begin": "\"",
+ "end": "\"|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#quotes"
+ }
+ ]
}
- },
- "end": "(?=$|[,);=])",
+ ]
+ },
+ "jsdoctype": {
"patterns": [
{
- "include": "#expression"
+ "name": "invalid.illegal.type.jsdoc",
+ "match": "\\G{(?:[^}*]|\\*[^/}])+$"
+ },
+ {
+ "contentName": "entity.name.type.instance.jsdoc",
+ "begin": "\\G({)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.jsdoc"
+ }
+ },
+ "end": "((}))\\s*|(?=\\*/)",
+ "endCaptures": {
+ "1": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.curly.end.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
}
]
}
- },
- "scopeName": "source.ts",
- "uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a66",
- "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/55b86614037e8c754c0657b0cd03f4f90c9498db"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScriptReact.tmLanguage.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScriptReact.tmLanguage.json
index c4cdaf89f4..78145cde03 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScriptReact.tmLanguage.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/syntaxes/TypeScriptReact.tmLanguage.json
@@ -1,184 +1,351 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.tmLanguage",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
+ "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/3a70fab1b03520774fa236f1f7e7a0939463739f",
+ "name": "TypeScriptReact",
+ "scopeName": "source.tsx",
"fileTypes": [
"tsx"
],
- "name": "TypeScriptReact",
+ "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
"patterns": [
{
- "include": "#expression"
- }
- ],
- "repository": {
- "access-modifier": {
- "match": "\\b(public|protected|private)\\b",
- "name": "storage.modifier.tsx"
+ "include": "#directives"
},
- "arithmetic-operator": {
- "match": "\\*|/|\\-\\-|\\-|\\+\\+|\\+|%",
- "name": "keyword.operator.arithmetic.tsx"
+ {
+ "include": "#statements"
},
- "array-literal": {
- "begin": "\\[",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.square.tsx"
- }
- },
- "end": "\\]",
- "endCaptures": {
- "0": {
- "name": "meta.brace.square.tsx"
+ {
+ "name": "comment.line.shebang.ts",
+ "match": "\\A(#!).*(?=$)",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.comment.ts"
}
- },
- "name": "meta.array.literal.tsx",
+ }
+ }
+ ],
+ "repository": {
+ "statements": {
"patterns": [
{
+ "include": "#string"
+ },
+ {
+ "include": "#template"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#declaration"
+ },
+ {
+ "include": "#switch-statement"
+ },
+ {
+ "include": "#for-loop"
+ },
+ {
+ "include": "#after-operator-block"
+ },
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#control-statement"
+ },
+ {
"include": "#expression"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "assignment-operator": {
- "match": "<<=|>>>=|>>=|\\*=|(?<!\\()/=|%=|\\+=|\\-=|&=|\\^=",
- "name": "keyword.operator.assignment.tsx"
- },
- "await-modifier": {
- "match": "\\bawait\\b",
- "name": "storage.modifier.tsx"
- },
- "block": {
- "begin": "\\{",
+ "var-expr": {
+ "name": "meta.var.expr.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.curly.tsx"
- }
- },
- "end": "\\}",
- "endCaptures": {
- "0": {
- "name": "meta.brace.curly.tsx"
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "storage.type.tsx"
}
},
- "name": "meta.block.tsx",
+ "end": "(?=$|^|;|}|(\\s+(of|in)\\s+))",
"patterns": [
{
- "include": "#object-member"
+ "include": "#destructuring-variable"
},
{
- "include": "#expression"
+ "include": "#var-single-variable"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#punctuation-comma"
}
]
},
- "boolean-literal": {
- "match": "\\b(false|true)\\b",
- "name": "constant.language.boolean.tsx"
- },
- "case-clause": {
- "begin": "(?<!\\.)\\b(case|default(?=:))\\b",
- "beginCaptures": {
- "1": {
- "name": "keyword.control.tsx"
- }
- },
- "end": ":",
- "name": "case-clause.expr.tsx",
+ "var-single-variable": {
"patterns": [
{
- "include": "#expression-type"
+ "name": "meta.var-single-variable.expr.tsx",
+ "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.tsx entity.name.function.tsx"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ },
+ {
+ "name": "meta.var-single-variable.expr.tsx",
+ "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.tsx variable.other.constant.tsx"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
+ },
+ {
+ "name": "meta.var-single-variable.expr.tsx",
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
+ "beginCaptures": {
+ "1": {
+ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
+ }
+ },
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#var-single-variable-type-annotation"
+ }
+ ]
}
]
},
- "comment": {
- "name": "comment.tsx",
+ "var-single-variable-type-annotation": {
"patterns": [
{
- "include": "#comment-block-doc"
+ "include": "#type-annotation"
},
{
- "include": "#comment-block"
+ "include": "#string"
},
{
- "include": "#comment-line"
+ "include": "#comment"
}
]
},
- "comment-block": {
- "begin": "/\\*",
- "end": "\\*/",
- "name": "comment.block.tsx"
- },
- "comment-block-doc": {
- "begin": "/\\*\\*(?!/)",
- "end": "\\*/",
- "name": "comment.block.documentation.tsx"
- },
- "comment-line": {
- "match": "(//).*$\\n?",
- "name": "comment.line.tsx"
- },
- "control-statement": {
- "match": "(?<!\\.)\\b(break|catch|continue|debugger|declare|do|else|finally|for|if|return|switch|throw|try|while|with|super|case|default|yield)\\b",
- "name": "keyword.control.tsx"
+ "destructuring-variable": {
+ "patterns": [
+ {
+ "name": "meta.object-binding-pattern-variable.tsx",
+ "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#comment"
+ }
+ ]
+ },
+ {
+ "name": "meta.array-binding-pattern-variable.tsx",
+ "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
+ "end": "(?=$|^|[;,=}]|(\\s+(of|in)\\s+))",
+ "patterns": [
+ {
+ "include": "#array-binding-pattern"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#comment"
+ }
+ ]
+ }
+ ]
},
- "decl-block": {
- "begin": "\\{",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.curly.tsx"
+ "object-binding-element": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#object-binding-element-propertyName"
+ },
+ {
+ "include": "#binding-element"
+ }
+ ]
+ },
+ {
+ "include": "#object-binding-pattern"
+ },
+ {
+ "include": "#destructuring-variable-rest"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#punctuation-comma"
}
- },
- "end": "\\}",
+ ]
+ },
+ "object-binding-element-propertyName": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(:)",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.tsx"
+ "name": "punctuation.destructuring.tsx"
}
},
- "name": "meta.decl.block.tsx",
"patterns": [
{
- "include": "#expression"
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "name": "variable.object.property.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
- "declaration": {
- "name": "meta.declaration.tsx",
+ "binding-element": {
"patterns": [
{
- "include": "#function-declaration"
+ "include": "#comment"
},
{
- "include": "#object-declaration"
+ "include": "#object-binding-pattern"
},
{
- "include": "#type-declaration"
+ "include": "#array-binding-pattern"
},
{
- "include": "#enum-declaration"
+ "include": "#destructuring-variable-rest"
+ },
+ {
+ "include": "#variable-initializer"
}
]
},
- "enum-declaration": {
+ "destructuring-variable-rest": {
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
- "name": "storage.modifier.tsx"
+ "name": "keyword.operator.rest.tsx"
},
"2": {
- "name": "storage.type.tsx"
+ "name": "meta.definition.variable.tsx variable.other.readwrite.tsx"
+ }
+ }
+ },
+ "object-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.tsx"
},
- "3": {
- "name": "entity.name.class.tsx"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.object.tsx"
}
},
- "match": "(?:\\b(const)\\s+)?\\b(enum)\\s+([a-zA-Z_$][\\w$]*)",
- "name": "meta.enum.declaration.tsx"
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-binding-element"
+ }
+ ]
},
- "expression": {
- "name": "meta.expression.tsx",
+ "array-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.tsx"
+ },
+ "2": {
+ "name": "punctuation.definition.binding-pattern.array.tsx"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.tsx"
+ }
+ },
"patterns": [
{
- "include": "#jsx"
+ "include": "#binding-element"
},
{
- "include": "#for-in-simple"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "ternary-expression": {
+ "begin": "(\\?)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.tsx"
+ }
+ },
+ "end": "(:)",
+ "endCaptures": {
+ "0": {
+ "name": "keyword.operator.ternary.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ "expression": {
+ "patterns": [
+ {
+ "include": "#jsx"
},
{
"include": "#string"
@@ -193,852 +360,1859 @@
"include": "#comment"
},
{
- "include": "#literal"
+ "include": "#function-expression"
},
{
- "include": "#paren-expression"
+ "include": "#class-or-interface-declaration"
},
{
- "include": "#var-expr"
+ "include": "#arrow-function"
},
{
- "include": "#declaration"
+ "include": "#cast"
},
{
- "include": "#new-expr"
- },
- {
- "include": "#switch-statement"
- },
- {
- "include": "#block"
- },
- {
- "include": "#import-operator"
- },
- {
- "include": "#expression-operator"
+ "include": "#ternary-expression"
},
{
- "include": "#imply-operator"
+ "include": "#new-expr"
},
{
- "include": "#relational-operator"
+ "include": "#object-literal"
},
{
- "include": "#arithmetic-operator"
+ "include": "#expression-operators"
},
{
- "include": "#logic-operator"
+ "include": "#function-call"
},
{
- "include": "#assignment-operator"
+ "include": "#literal"
},
{
- "include": "#storage-keyword"
+ "include": "#support-objects"
},
{
- "include": "#type-primitive"
+ "include": "#identifiers"
},
{
- "include": "#function-call"
+ "include": "#paren-expression"
},
{
- "include": "#case-clause"
+ "include": "#punctuation-comma"
},
{
- "include": "#control-statement"
+ "include": "#punctuation-accessor"
}
]
},
- "expression-operator": {
- "match": "\\b(delete|in|instanceof|new|typeof|as|is|of)\\b",
- "name": "keyword.others.tsx"
- },
- "expression-type": {
- "name": "meta.expression.tsx",
+ "control-statement": {
"patterns": [
{
- "include": "#string"
+ "name": "keyword.control.trycatch.tsx",
+ "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$|\\.)"
},
{
- "include": "#regex"
+ "name": "keyword.control.loop.tsx",
+ "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$|\\.)"
},
{
- "include": "#template"
+ "name": "keyword.control.flow.tsx",
+ "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$|\\.)"
},
{
- "include": "#comment"
+ "name": "keyword.control.switch.tsx",
+ "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$|\\.)"
},
{
- "include": "#literal"
+ "name": "keyword.control.conditional.tsx",
+ "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$|\\.)"
},
{
- "include": "#paren-expression"
+ "name": "keyword.control.with.tsx",
+ "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$|\\.)"
},
{
- "include": "#ternary-expression"
+ "name": "keyword.other.debugger.tsx",
+ "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$|\\.)"
},
{
- "include": "#import-operator"
+ "name": "storage.modifier.tsx",
+ "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$|\\.)"
+ }
+ ]
+ },
+ "declaration": {
+ "patterns": [
+ {
+ "include": "#decorator"
},
{
- "include": "#expression-operator"
+ "include": "#var-expr"
+ },
+ {
+ "include": "#function-declaration"
},
{
- "include": "#imply-operator"
+ "include": "#class-or-interface-declaration"
},
{
- "include": "#relational-operator"
+ "include": "#type-declaration"
},
{
- "include": "#arithmetic-operator"
+ "include": "#enum-declaration"
},
{
- "include": "#logic-operator"
+ "include": "#namespace-declaration"
},
{
- "include": "#assignment-operator"
+ "include": "#import-equals-declaration"
},
{
- "include": "#type-primitive"
+ "include": "#import-declaration"
},
{
- "include": "#function-call"
+ "include": "#export-declaration"
}
]
},
- "field-declaration": {
- "begin": "(?<!\\()\\s*((?:\\b[a-zA-Z_$][\\w$]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\"))\\s*(\\?\\s*)?(?=(=|:))",
+ "decorator": {
+ "name": "meta.decorator.tsx",
+ "begin": "(?<!\\.|\\$)\\@",
"beginCaptures": {
- "1": {
- "name": "variable.tsx"
- },
- "2": {
- "name": "keyword.others.tsx"
+ "0": {
+ "name": "punctuation.decorator.tsx"
}
},
- "end": "(?=\\}|;|,|$)|(?<=\\})",
- "name": "meta.field.declaration.tsx",
+ "end": "(?=\\s)",
"patterns": [
{
"include": "#expression"
}
]
},
- "for-in-simple": {
- "captures": {
+ "type-declaration": {
+ "name": "meta.type.declaration.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
+ "beginCaptures": {
"1": {
- "name": "storage.type.tsx"
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "storage.type.type.tsx"
},
"3": {
- "name": "keyword.others.tsx"
+ "name": "entity.name.type.alias.tsx"
}
},
- "match": "(?<=\\()\\s*\\b(var|let|const)\\s+([a-zA-Z_$][\\w$]*)\\s+(in|of)\\b",
- "name": "forin.expr.tsx"
- },
- "function-call": {
- "name": "functioncall.expr.tsx",
+ "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
"patterns": [
{
- "include": "#await-modifier"
+ "include": "#comment"
},
{
"include": "#type-parameters"
},
{
- "include": "#paren-expression"
+ "include": "#type"
+ },
+ {
+ "match": "(=)\\s*",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.assignment.tsx"
+ }
+ }
}
]
},
- "function-declaration": {
- "begin": "\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
+ "enum-declaration": {
+ "name": "meta.enum.declaration.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
"beginCaptures": {
"1": {
- "name": "storage.type.tsx"
+ "name": "keyword.control.export.tsx"
},
"2": {
"name": "storage.modifier.tsx"
},
"3": {
- "name": "storage.type.function.tsx"
+ "name": "storage.type.enum.tsx"
},
"4": {
- "name": "entity.name.function.tsx"
+ "name": "entity.name.type.enum.tsx"
}
},
- "end": "(?=;|\\})|(?<=\\})",
- "name": "meta.function.tsx",
+ "end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#type-parameters"
- },
- {
- "include": "#function-type-parameters"
- },
- {
- "include": "#return-type"
- },
- {
- "include": "#function-overload-declaration"
- },
- {
- "include": "#decl-block"
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
+ "beginCaptures": {
+ "0": {
+ "name": "variable.other.enummember.tsx"
+ }
+ },
+ "end": "(?=,|\\}|$)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#variable-initializer"
+ }
+ ]
+ },
+ {
+ "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
+ "end": "(?=,|\\}|$)",
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#variable-initializer"
+ }
+ ]
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
}
]
},
- "function-overload-declaration": {
- "captures": {
+ "namespace-declaration": {
+ "name": "meta.namespace.declaration.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`])",
+ "beginCaptures": {
"1": {
- "name": "storage.type.tsx"
+ "name": "keyword.control.export.tsx"
},
"2": {
- "name": "storage.type.function.tsx"
- },
- "3": {
- "name": "entity.name.function.tsx"
- }
- },
- "match": "\\b(?:(export)\\s+)?(function\\b)(?:\\s+([a-zA-Z_$][\\w$]*))?\\s*",
- "name": "meta.function.overload.tsx"
- },
- "function-type-parameters": {
- "begin": "\\(",
- "beginCaptures": {
- "0": {
- "name": "meta.brace.round.tsx"
- }
- },
- "end": "\\)",
- "endCaptures": {
- "0": {
- "name": "meta.brace.round.tsx"
+ "name": "storage.type.namespace.tsx"
}
},
- "name": "meta.function.type.parameter.tsx",
+ "end": "(?<=\\})",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#parameter-name"
+ "include": "#string"
},
{
- "include": "#type-annotation"
+ "name": "entity.name.type.module.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
},
{
- "include": "#variable-initializer"
+ "include": "#punctuation-accessor"
+ },
+ {
+ "include": "#decl-block"
}
]
},
- "imply-operator": {
- "match": "=>",
- "name": "keyword.operator.tsx"
- },
- "import-operator": {
- "match": "\\b(import|from)\\b",
- "name": "keyword.control.import.include.tsx"
+ "import-equals-declaration": {
+ "patterns": [
+ {
+ "name": "meta.import-equals.external.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "keyword.control.import.tsx"
+ },
+ "3": {
+ "name": "variable.other.readwrite.alias.tsx"
+ },
+ "4": {
+ "name": "keyword.operator.assignment.tsx"
+ },
+ "5": {
+ "name": "keyword.control.require.tsx"
+ },
+ "6": {
+ "name": "meta.brace.round.tsx"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#string"
+ }
+ ]
+ },
+ {
+ "name": "meta.import-equals.internal.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "keyword.control.import.tsx"
+ },
+ "3": {
+ "name": "variable.other.readwrite.alias.tsx"
+ },
+ "4": {
+ "name": "keyword.operator.assignment.tsx"
+ }
+ },
+ "end": "(?=;|$)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ }
+ }
+ },
+ {
+ "name": "variable.other.readwrite.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ }
+ ]
+ }
+ ]
},
- "indexer-declaration": {
- "begin": "\\[",
+ "import-declaration": {
+ "name": "meta.import.tsx",
+ "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$|\\.))\\b",
"beginCaptures": {
- "0": {
- "name": "meta.brace.square.tsx"
- }
- },
- "end": "(\\])\\s*(\\?\\s*)?|$",
- "endCaptures": {
"1": {
- "name": "meta.brace.square.tsx"
+ "name": "keyword.control.export.tsx"
},
"2": {
- "name": "keyword.others.tsx"
+ "name": "keyword.control.import.tsx"
}
},
- "name": "meta.indexer.declaration.tsx",
+ "end": "(?=;|$)",
"patterns": [
{
- "include": "#type-annotation"
+ "include": "#import-export-declaration"
+ }
+ ]
+ },
+ "export-declaration": {
+ "patterns": [
+ {
+ "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "keyword.control.as.tsx"
+ },
+ "3": {
+ "name": "storage.type.namespace.tsx"
+ },
+ "4": {
+ "name": "entity.name.type.module.tsx"
+ }
+ }
},
{
- "include": "#indexer-parameter"
+ "name": "meta.export.default.tsx",
+ "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "keyword.operator.assignment.tsx"
+ },
+ "3": {
+ "name": "keyword.control.default.tsx"
+ }
+ },
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
},
{
- "include": "#expression"
+ "name": "meta.export.tsx",
+ "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.control.export.tsx"
+ }
+ },
+ "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
+ "patterns": [
+ {
+ "include": "#import-export-declaration"
+ }
+ ]
}
]
},
- "indexer-parameter": {
- "captures": {
- "1": {
- "name": "variable.parameter.tsx"
- }
- },
- "match": "([a-zA-Z_$][\\w$]*)(?=\\:)",
- "name": "meta.indexer.parameter.tsx"
- },
- "jsx": {
- "name": "meta.jsx.tsx",
+ "import-export-declaration": {
"patterns": [
{
- "include": "#jsx-tag-without-attributes"
+ "include": "#comment"
},
{
- "include": "#jsx-tag-open"
+ "include": "#string"
},
{
- "include": "#jsx-tag-close"
+ "include": "#import-export-block"
},
{
- "include": "#jsx-tag-invalid"
+ "name": "keyword.control.from.tsx",
+ "match": "\\bfrom\\b"
},
{
- "begin": "(?<=(?:'|\"|})>)",
- "end": "(?=</)",
- "name": "meta.jsx.children.tsx",
- "patterns": [
- {
- "include": "#jsx-children"
- }
- ]
+ "include": "#import-export-clause"
}
]
},
- "jsx-children": {
+ "import-export-block": {
+ "name": "meta.block.tsx",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
"patterns": [
{
- "include": "#jsx-tag-without-attributes"
+ "include": "#import-export-clause"
+ }
+ ]
+ },
+ "import-export-clause": {
+ "patterns": [
+ {
+ "include": "#comment"
},
{
- "include": "#jsx-tag-open"
+ "comment": "(default|*|name) as alias",
+ "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ \n (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
+ "captures": {
+ "1": {
+ "name": "keyword.control.default.tsx"
+ },
+ "2": {
+ "name": "constant.language.import-export-all.tsx"
+ },
+ "3": {
+ "name": "variable.other.readwrite.tsx"
+ },
+ "4": {
+ "name": "keyword.control.as.tsx"
+ },
+ "5": {
+ "name": "invalid.illegal.tsx"
+ },
+ "6": {
+ "name": "variable.other.readwrite.alias.tsx"
+ }
+ }
},
{
- "include": "#jsx-tag-close"
+ "include": "#punctuation-comma"
},
{
- "include": "#jsx-tag-invalid"
+ "name": "constant.language.import-export-all.tsx",
+ "match": "\\*"
},
{
- "include": "#jsx-evaluated-code"
+ "name": "keyword.control.default.tsx",
+ "match": "\\b(default)\\b"
},
{
- "include": "#jsx-entities"
+ "name": "variable.other.readwrite.alias.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
}
]
},
- "jsx-entities": {
+ "class-or-interface-declaration": {
"patterns": [
{
- "captures": {
+ "name": "meta.class.tsx",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
+ "beginCaptures": {
"1": {
- "name": "punctuation.definition.entity.tsx"
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "storage.modifier.tsx"
},
"3": {
- "name": "punctuation.definition.entity.tsx"
+ "name": "storage.type.class.tsx"
}
},
- "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
- "name": "constant.character.entity.tsx"
+ "end": "(?<=\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.class.tsx"
+ }
+ }
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#class-or-interface-body"
+ }
+ ]
},
{
- "match": "&",
- "name": "invalid.illegal.bad-ampersand.tsx"
+ "name": "meta.interface.tsx",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "storage.modifier.tsx"
+ },
+ "3": {
+ "name": "storage.type.interface.tsx"
+ }
+ },
+ "end": "(?<=\\})",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "match": "[_$[:alpha:]][_$[:alnum:]]*",
+ "captures": {
+ "0": {
+ "name": "entity.name.type.interface.tsx"
+ }
+ }
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#class-or-interface-body"
+ }
+ ]
}
]
},
- "jsx-evaluated-code": {
- "begin": "{",
+ "class-or-interface-heritage": {
+ "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "punctuation.definition.brace.curly.start.tsx"
+ "1": {
+ "name": "storage.modifier.tsx"
}
},
- "end": "}",
+ "end": "(?=\\{)",
"endCaptures": {
- "0": {
- "name": "punctuation.definition.brace.curly.end.tsx"
+ "1": {
+ "name": "punctuation.definition.block.tsx"
}
},
- "name": "meta.brace.curly.tsx",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
+ "include": "#class-or-interface-heritage"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ }
+ }
+ },
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
+ "captures": {
+ "1": {
+ "name": "entity.other.inherited-class.tsx"
+ }
+ }
+ },
+ {
"include": "#expression"
}
]
},
- "jsx-string-double-quoted": {
- "begin": "\"",
+ "class-or-interface-body": {
+ "begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.definition.string.begin.tsx"
+ "name": "punctuation.definition.block.tsx"
}
},
- "end": "\"",
+ "end": "\\}",
"endCaptures": {
"0": {
- "name": "punctuation.definition.string.end.tsx"
+ "name": "punctuation.definition.block.tsx"
}
},
- "name": "string.quoted.double.tsx",
"patterns": [
{
- "include": "#jsx-entities"
+ "include": "#string"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#decorator"
+ },
+ {
+ "include": "#method-declaration"
+ },
+ {
+ "include": "#indexer-declaration"
+ },
+ {
+ "include": "#field-declaration"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "include": "#access-modifier"
+ },
+ {
+ "include": "#property-accessor"
+ },
+ {
+ "include": "#after-operator-block"
+ },
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#expression"
+ },
+ {
+ "include": "#punctuation-comma"
+ },
+ {
+ "include": "#punctuation-semicolon"
}
]
},
- "jsx-string-single-quoted": {
- "begin": "'",
+ "type-object": {
+ "name": "meta.object.type.tsx",
+ "begin": "\\{",
"beginCaptures": {
"0": {
- "name": "punctuation.definition.string.begin.tsx"
+ "name": "punctuation.definition.block.tsx"
}
},
- "end": "'",
+ "end": "\\}",
"endCaptures": {
"0": {
- "name": "punctuation.definition.string.end.tsx"
+ "name": "punctuation.definition.block.tsx"
}
},
- "name": "string.quoted.single.tsx",
"patterns": [
{
- "include": "#jsx-entities"
+ "include": "#comment"
+ },
+ {
+ "include": "#method-declaration"
+ },
+ {
+ "include": "#indexer-declaration"
+ },
+ {
+ "include": "#indexer-mapped-type-declaration"
+ },
+ {
+ "include": "#field-declaration"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "begin": "\\.\\.\\.",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.spread.tsx"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "include": "#punctuation-comma"
+ },
+ {
+ "include": "#punctuation-semicolon"
+ },
+ {
+ "include": "#type"
}
]
},
- "jsx-tag-attribute-assignment": {
- "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))",
- "name": "keyword.operator.assignment.tsx"
- },
- "jsx-tag-attribute-name": {
- "captures": {
+ "field-declaration": {
+ "name": "meta.field.declaration.tsx",
+ "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
+ "beginCaptures": {
"1": {
- "name": "entity.other.attribute-name.tsx"
+ "name": "storage.modifier.tsx"
}
},
- "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
- "name": "meta.tag.attribute-name.tsx"
+ "end": "(?=\\}|;|,|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))",
+ "end": "(?=[};,=]|$|(^(?!(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\?\\s*)?(=|:))))|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "name": "meta.definition.property.tsx entity.name.function.tsx",
+ "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)"
+ },
+ {
+ "name": "meta.definition.property.tsx variable.object.property.tsx",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
+ },
+ {
+ "name": "keyword.operator.optional.tsx",
+ "match": "\\?"
+ }
+ ]
+ }
+ ]
},
- "jsx-tag-attributes": {
+ "method-declaration": {
"patterns": [
{
- "include": "#jsx-tag-attribute-name"
+ "name": "meta.method.declaration.tsx",
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.tsx"
+ },
+ "2": {
+ "name": "storage.modifier.tsx"
+ },
+ "3": {
+ "name": "storage.modifier.async.tsx"
+ },
+ "4": {
+ "name": "storage.type.property.tsx"
+ },
+ "5": {
+ "name": "keyword.generator.asterisk.tsx"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
},
{
- "include": "#jsx-tag-attribute-assignment"
+ "name": "meta.method.declaration.tsx",
+ "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|\\.|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.tsx"
+ },
+ "2": {
+ "name": "storage.modifier.tsx"
+ },
+ "3": {
+ "name": "storage.modifier.async.tsx"
+ },
+ "4": {
+ "name": "keyword.operator.new.tsx"
+ },
+ "5": {
+ "name": "storage.type.tsx"
+ },
+ "6": {
+ "name": "keyword.generator.asterisk.tsx"
+ }
+ },
+ "end": "(?=\\}|;|,|$)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
+ }
+ ]
+ },
+ "method-declaration-name": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
+ "end": "(?=\\(|\\<)",
+ "patterns": [
+ {
+ "include": "#string"
},
{
- "include": "#jsx-string-double-quoted"
+ "include": "#array-literal"
},
{
- "include": "#jsx-string-single-quoted"
+ "name": "meta.definition.method.tsx entity.name.function.tsx",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
},
{
- "include": "#jsx-evaluated-code"
+ "name": "keyword.operator.optional.tsx",
+ "match": "\\?"
}
]
},
- "jsx-tag-attributes-illegal": {
- "match": "\\S+",
- "name": "invalid.illegal.attribute.tsx"
- },
- "jsx-tag-close": {
- "begin": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))",
+ "object-literal-method-declaration": {
+ "name": "meta.method.declaration.tsx",
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.tsx"
+ "name": "storage.modifier.async.tsx"
},
"2": {
- "name": "entity.name.tag.tsx"
+ "name": "storage.type.property.tsx"
+ },
+ "3": {
+ "name": "keyword.generator.asterisk.tsx"
}
},
- "end": "(>)",
- "endCaptures": {
+ "end": "(?=\\}|;|,)|(?<=\\})",
+ "patterns": [
+ {
+ "include": "#method-declaration-name"
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#return-type"
+ },
+ {
+ "include": "#object-literal-method-overload-declaration"
+ },
+ {
+ "include": "#decl-block"
+ }
+ ]
+ },
+ "object-literal-method-overload-declaration": {
+ "begin": "(?<!\\.|\\$)(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*[\\(\\<])",
+ "beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.end.tsx"
+ "name": "storage.modifier.async.tsx"
+ },
+ "2": {
+ "name": "storage.type.property.tsx"
+ },
+ "3": {
+ "name": "keyword.generator.asterisk.tsx"
}
},
- "name": "tag.close.tsx",
+ "end": "(?=\\(|\\<)",
"patterns": [
{
- "include": "#comment"
+ "include": "#method-declaration-name"
}
]
},
- "jsx-tag-invalid": {
- "match": "<\\s*>",
- "name": "invalid.illegal.tag.incomplete.tsx"
- },
- "jsx-tag-open": {
- "begin": "(?x)\n (<)\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
+ "indexer-declaration": {
+ "name": "meta.indexer.declaration.tsx",
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.tsx"
+ "name": "storage.modifier.tsx"
},
"2": {
- "name": "entity.name.tag.tsx"
+ "name": "meta.brace.square.tsx"
+ },
+ "3": {
+ "name": "variable.parameter.tsx"
}
},
- "end": "(/?>)",
+ "end": "(\\])\\s*(\\?\\s*)?|$",
"endCaptures": {
"1": {
- "name": "punctuation.definition.tag.end.tsx"
+ "name": "meta.brace.square.tsx"
+ },
+ "2": {
+ "name": "keyword.operator.optional.tsx"
}
},
- "name": "tag.open.tsx",
"patterns": [
{
- "include": "#comment"
- },
- {
- "include": "#jsx-tag-attributes"
- },
- {
- "include": "#jsx-tag-attributes-illegal"
+ "include": "#type-annotation"
}
]
},
- "jsx-tag-without-attributes": {
- "begin": "(<)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
+ "indexer-mapped-type-declaration": {
+ "name": "meta.indexer.mappedtype.declaration.tsx",
+ "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
"beginCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.tsx"
+ "name": "storage.modifier.tsx"
},
"2": {
- "name": "entity.name.tag.tsx"
+ "name": "meta.brace.square.tsx"
},
"3": {
- "name": "punctuation.definition.tag.end.tsx"
+ "name": "entity.name.type.tsx"
+ },
+ "4": {
+ "name": "keyword.operator.expression.in.tsx"
}
},
- "end": "(</)([_$a-zA-Z][-$\\w.]*(?<!\\.|-))(>)",
+ "end": "(\\])\\s*(\\?\\s*)?|$",
"endCaptures": {
"1": {
- "name": "punctuation.definition.tag.begin.tsx"
+ "name": "meta.brace.square.tsx"
},
"2": {
- "name": "entity.name.tag.tsx"
- },
- "3": {
- "name": "punctuation.definition.tag.end.tsx"
+ "name": "keyword.operator.optional.tsx"
}
},
- "name": "tag.without-attributes.tsx",
"patterns": [
{
- "include": "#jsx-children"
+ "include": "#type"
}
]
},
- "literal": {
- "name": "literal.tsx",
- "patterns": [
- {
- "include": "#numeric-literal"
+ "function-declaration": {
+ "name": "meta.function.tsx",
+ "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.export.tsx"
+ },
+ "2": {
+ "name": "storage.modifier.async.tsx"
},
+ "3": {
+ "name": "storage.type.function.tsx"
+ },
+ "4": {
+ "name": "keyword.generator.asterisk.tsx"
+ },
+ "5": {
+ "name": "meta.definition.function.tsx entity.name.function.tsx"
+ }
+ },
+ "end": "(?=$|^|;)|(?<=\\})",
+ "patterns": [
{
- "include": "#boolean-literal"
+ "include": "#comment"
},
{
- "include": "#null-literal"
+ "include": "#type-parameters"
},
{
- "include": "#undefined-literal"
+ "include": "#function-parameters"
},
{
- "include": "#array-literal"
+ "include": "#return-type"
},
{
- "include": "#this-literal"
+ "include": "#decl-block"
}
]
},
- "logic-operator": {
- "match": "\\!|&&|&|~|\\^|\\|\\||\\|",
- "name": "keyword.operator.arithmetic.tsx"
- },
- "method-declaration": {
- "begin": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
+ "function-expression": {
+ "name": "meta.function.expression.tsx",
+ "begin": "(?<!\\.|\\$)\\b(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
"beginCaptures": {
"1": {
- "name": "storage.modifier.tsx"
+ "name": "storage.modifier.async.tsx"
},
"2": {
- "name": "storage.modifier.tsx"
+ "name": "storage.type.function.tsx"
},
"3": {
- "name": "storage.modifier.tsx"
+ "name": "keyword.generator.asterisk.tsx"
},
"4": {
- "name": "storage.type.property.tsx"
+ "name": "meta.definition.function.tsx entity.name.function.tsx"
+ }
+ },
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#comment"
},
- "5": {
- "name": "keyword.operator.tsx"
+ {
+ "include": "#type-parameters"
},
- "6": {
- "name": "storage.type.tsx"
+ {
+ "include": "#function-parameters"
},
- "7": {
- "name": "entity.name.function.tsx"
+ {
+ "include": "#return-type"
},
- "8": {
- "name": "keyword.operator.tsx"
+ {
+ "include": "#decl-block"
+ }
+ ]
+ },
+ "object-literal": {
+ "name": "meta.objectliteral.tsx",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
}
},
- "end": "(?=\\}|;|,)|(?<=\\})",
- "name": "meta.method.declaration.tsx",
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-member"
+ }
+ ]
+ },
+ "decl-block": {
+ "name": "meta.block.tsx",
+ "begin": "\\{",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#statements"
+ }
+ ]
+ },
+ "after-operator-block": {
+ "name": "meta.objectliteral.tsx",
+ "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#object-member"
+ }
+ ]
+ },
+ "parameter-name": {
+ "patterns": [
+ {
+ "match": "\\s*\\b(public|protected|private|readonly)(?=\\s+(public|protected|private|readonly)\\s+)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*\n (=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n )) |\n (:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n ))\n)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.tsx"
+ },
+ "2": {
+ "name": "keyword.operator.rest.tsx"
+ },
+ "3": {
+ "name": "entity.name.function.tsx variable.language.this.tsx"
+ },
+ "4": {
+ "name": "entity.name.function.tsx"
+ },
+ "5": {
+ "name": "keyword.operator.optional.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?:\\s*\\b(public|private|protected|readonly)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)(?:((?<!\\.|\\$)\\bthis\\b(?!\\.|\\$))|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.tsx"
+ },
+ "2": {
+ "name": "keyword.operator.rest.tsx"
+ },
+ "3": {
+ "name": "variable.parameter.tsx variable.language.this.tsx"
+ },
+ "4": {
+ "name": "variable.parameter.tsx"
+ },
+ "5": {
+ "name": "keyword.operator.optional.tsx"
+ }
+ }
+ }
+ ]
+ },
+ "destructuring-parameter": {
+ "patterns": [
+ {
+ "name": "meta.parameter.object-binding-pattern.tsx",
+ "begin": "(?<!=|:)\\s*(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.binding-pattern.object.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-object-binding-element"
+ }
+ ]
+ },
+ {
+ "name": "meta.paramter.array-binding-pattern.tsx",
+ "begin": "(?<!=|:)\\s*(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.binding-pattern.array.tsx"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-binding-element"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ }
+ ]
+ },
+ "parameter-object-binding-element": {
"patterns": [
{
"include": "#comment"
},
{
- "include": "#type-parameters"
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#object-binding-element-propertyName"
+ },
+ {
+ "include": "#parameter-binding-element"
+ }
+ ]
},
{
- "include": "#function-type-parameters"
+ "include": "#parameter-object-binding-pattern"
},
{
- "include": "#type-annotation"
+ "include": "#destructuring-parameter-rest"
},
{
- "include": "#method-overload-declaration"
+ "include": "#variable-initializer"
},
{
- "include": "#decl-block"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "parameter-binding-element": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#parameter-object-binding-pattern"
+ },
+ {
+ "include": "#parameter-array-binding-pattern"
+ },
+ {
+ "include": "#destructuring-parameter-rest"
+ },
+ {
+ "include": "#variable-initializer"
}
]
},
- "method-overload-declaration": {
+ "destructuring-parameter-rest": {
+ "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
"captures": {
"1": {
- "name": "storage.modifier.tsx"
+ "name": "keyword.operator.rest.tsx"
},
"2": {
- "name": "storage.modifier.tsx"
+ "name": "variable.parameter.tsx"
+ }
+ }
+ },
+ "parameter-object-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.tsx"
},
- "3": {
- "name": "storage.modifier.tsx"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.object.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.object.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-object-binding-element"
+ }
+ ]
+ },
+ "parameter-array-binding-pattern": {
+ "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.rest.tsx"
},
- "4": {
- "name": "storage.type.property.tsx"
+ "2": {
+ "name": "punctuation.definition.binding-pattern.array.tsx"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.binding-pattern.array.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#parameter-binding-element"
},
- "5": {
- "name": "keyword.operator.tsx"
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "return-type": {
+ "name": "meta.return.type.tsx",
+ "begin": "(?<=\\))\\s*(:)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.type.annotation.tsx"
+ }
+ },
+ "end": "(?<![:|&])(?=$|^|[{};,]|//)",
+ "patterns": [
+ {
+ "include": "#comment"
},
- "6": {
- "name": "storage.type.tsx"
+ {
+ "begin": "(?<=[:])(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
- "7": {
- "name": "entity.name.function.tsx"
+ {
+ "include": "#type-predicate-operator"
},
- "8": {
- "name": "keyword.operator.tsx"
+ {
+ "include": "#type"
}
- },
- "match": "\\b(?:(abstract)\\s+)?\\b(?:(public|private|protected)\\s+)?\\b(?:(async)\\s+)?(?:(get|set)\\s+)?(?:(new)|(?:\\b(constructor)\\b)|(?:([a-zA-Z_$][\\.\\w$]*)\\s*(\\??)))?\\s*(?=\\(|\\<)",
- "name": "meta.method.overload.declaration.tsx"
+ ]
},
- "new-expr": {
- "begin": "\\b(new)\\b",
+ "type-predicate-operator": {
+ "name": "keyword.operator.expression.is.tsx",
+ "match": "(?<!\\.|\\$)\\bis\\b(?!\\$|\\.)"
+ },
+ "type-annotation": {
+ "name": "meta.type.annotation.tsx",
+ "begin": ":",
"beginCaptures": {
- "1": {
- "name": "keyword.others.tsx"
+ "0": {
+ "name": "keyword.operator.type.annotation.tsx"
}
},
- "end": "(?=[(;]|$)",
- "name": "new.expr.tsx",
+ "end": "(?=$|^|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
"patterns": [
{
+ "include": "#comment"
+ },
+ {
"include": "#type"
+ }
+ ]
+ },
+ "type": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#numeric-literal"
+ },
+ {
+ "include": "#type-primitive"
+ },
+ {
+ "include": "#type-builtin-literals"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#type-tuple"
+ },
+ {
+ "include": "#type-object"
+ },
+ {
+ "include": "#type-operators"
+ },
+ {
+ "include": "#type-fn-type-parameters"
},
{
+ "include": "#type-paren-or-function-parameters"
+ },
+ {
+ "include": "#type-function-return-type"
+ },
+ {
+ "include": "#type-name"
+ }
+ ]
+ },
+ "function-parameters": {
+ "name": "meta.parameters.tsx",
+ "begin": "\\(",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.begin.tsx"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.parameters.end.tsx"
+ }
+ },
+ "patterns": [
+ {
"include": "#comment"
+ },
+ {
+ "include": "#decorator"
+ },
+ {
+ "include": "#destructuring-parameter"
+ },
+ {
+ "include": "#parameter-name"
+ },
+ {
+ "include": "#type-annotation"
+ },
+ {
+ "include": "#variable-initializer"
+ },
+ {
+ "name": "punctuation.separator.parameter.tsx",
+ "match": ","
}
]
},
- "null-literal": {
- "match": "\\b(null)\\b",
- "name": "constant.language.null.tsx"
+ "type-primitive": {
+ "name": "support.type.primitive.tsx",
+ "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$|\\.)"
},
- "numeric-literal": {
- "match": "\\b(?<=[^$])((0(x|X)[0-9a-fA-F]+)|(0(o|O)[0-7]+)|(0(b|B)(0|1)+)|(([0-9]+(\\.[0-9]+)?))([eE]([+-]?)[0-9]+(\\.[0-9]+)?)?)\\b",
- "name": "constant.numeric.tsx"
+ "type-builtin-literals": {
+ "name": "support.type.builtin.tsx",
+ "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null|object)\\b(?!\\$|\\.)"
},
- "object-body": {
- "begin": "\\{",
+ "type-paren-or-function-parameters": {
+ "name": "meta.type.paren.cover.tsx",
+ "begin": "\\(",
"beginCaptures": {
"0": {
- "name": "meta.brace.curly.tsx"
+ "name": "meta.brace.round.tsx"
}
},
- "end": "\\}",
+ "end": "\\)",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.tsx"
+ "name": "meta.brace.round.tsx"
}
},
- "name": "meta.object.body.tsx",
"patterns": [
{
- "include": "#string"
+ "include": "#type"
},
{
- "include": "#comment"
+ "include": "#function-parameters"
+ }
+ ]
+ },
+ "type-fn-type-parameters": {
+ "patterns": [
+ {
+ "name": "meta.type.constructor.tsx",
+ "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
+ "captures": {
+ "1": {
+ "name": "keyword.control.new.tsx"
+ }
+ }
},
{
- "include": "#field-declaration"
+ "name": "meta.type.constructor.tsx",
+ "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.new.tsx"
+ }
+ },
+ "end": "(?<=\\))",
+ "patterns": [
+ {
+ "include": "#function-parameters"
+ }
+ ]
},
{
- "include": "#method-declaration"
+ "name": "meta.type.function.tsx",
+ "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) | \n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
+ "end": "(?<=\\))",
+ "patterns": [
+ {
+ "include": "#function-parameters"
+ }
+ ]
+ }
+ ]
+ },
+ "type-operators": {
+ "patterns": [
+ {
+ "include": "#typeof-operator"
},
{
- "include": "#indexer-declaration"
+ "begin": "([&|])(?=\\s*\\{)",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.tsx"
+ }
+ },
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "include": "#type-annotation"
+ "begin": "[&|]",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.type.tsx"
+ }
+ },
+ "end": "(?=\\S)"
},
{
- "include": "#variable-initializer"
+ "name": "keyword.operator.expression.keyof.tsx",
+ "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$|\\.)"
+ }
+ ]
+ },
+ "type-function-return-type": {
+ "name": "meta.type.function.return.tsx",
+ "begin": "=>",
+ "beginCaptures": {
+ "0": {
+ "name": "storage.type.function.arrow.tsx"
+ }
+ },
+ "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>]|//|$)",
+ "patterns": [
+ {
+ "include": "#comment"
},
{
- "include": "#access-modifier"
+ "begin": "(?<==>)(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
},
{
- "include": "#static-modifier"
+ "include": "#type-predicate-operator"
},
{
- "include": "#property-accessor"
+ "include": "#type"
}
]
},
- "object-declaration": {
- "begin": "\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?<!\\.)(class|interface)\\b",
+ "type-tuple": {
+ "name": "meta.type.tuple.tsx",
+ "begin": "\\[",
"beginCaptures": {
- "1": {
- "name": "storage.type.tsx"
+ "0": {
+ "name": "meta.brace.square.tsx"
+ }
+ },
+ "end": "\\]",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.square.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
},
- "2": {
- "name": "storage.modifier.tsx"
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "type-name": {
+ "patterns": [
+ {
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
+ "captures": {
+ "1": {
+ "name": "entity.name.type.module.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ }
+ }
},
- "3": {
- "name": "storage.type.tsx"
+ {
+ "name": "entity.name.type.tsx",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
+ }
+ ]
+ },
+ "type-parameters": {
+ "name": "meta.type.parameters.tsx",
+ "begin": "(<)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.typeparameters.begin.tsx"
}
},
- "end": "(?<=\\})",
+ "end": "(>)",
"endCaptures": {
"1": {
- "name": "brace.curly.tsx"
+ "name": "punctuation.definition.typeparameters.end.tsx"
}
},
- "name": "meta.declaration.object.tsx",
"patterns": [
{
"include": "#comment"
},
{
- "include": "#object-heritage"
+ "name": "storage.modifier.tsx",
+ "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
},
{
- "include": "#object-name"
+ "name": "keyword.operator.assignment.tsx",
+ "match": "\\=(?!>)"
},
{
- "include": "#type-parameters"
+ "include": "#type"
},
{
- "include": "#object-body"
+ "include": "#punctuation-comma"
}
]
},
- "object-heritage": {
- "begin": "(?:\\b(extends|implements)\\b)",
+ "variable-initializer": {
+ "patterns": [
+ {
+ "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.tsx"
+ }
+ },
+ "end": "(?=$|^|[,);}\\]])",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "begin": "(?<!=|!)(=)(?!=)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.assignment.tsx"
+ }
+ },
+ "end": "(?=[,);}\\]])|(?=^\\s*$)|(?<=\\S)(?<!=)",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ }
+ ]
+ },
+ "for-loop": {
+ "begin": "(?<!\\.|\\$)\\b(for)(?:\\s+(await))?\\s*(\\()",
"beginCaptures": {
"1": {
- "name": "keyword.other.tsx"
+ "name": "keyword.control.loop.tsx"
+ },
+ "2": {
+ "name": "keyword.control.loop.tsx"
+ },
+ "3": {
+ "name": "meta.brace.round.tsx"
}
},
- "end": "(?=\\{)",
+ "end": "\\)",
"endCaptures": {
- "1": {
- "name": "brace.curly.tsx"
+ "0": {
+ "name": "meta.brace.round.tsx"
}
},
- "name": "meta.object.heritage.tsx",
"patterns": [
{
- "include": "#comment"
- },
- {
- "include": "#object-heritage"
+ "include": "#var-expr"
},
{
- "include": "#type-parameters"
+ "include": "#expression"
},
{
- "include": "#object-heritage-type"
+ "include": "#punctuation-semicolon"
}
]
},
- "object-heritage-type": {
- "captures": {
+ "switch-expression": {
+ "name": "switch-expression.expr.tsx",
+ "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
+ "beginCaptures": {
"1": {
- "name": "support.type.tsx"
+ "name": "keyword.control.switch.tsx"
+ },
+ "2": {
+ "name": "meta.brace.round.tsx"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "meta.brace.round.tsx"
}
},
- "match": "(?:\\b([a-zA-Z_$][\\w$]*)\\b)",
- "name": "meta.object.heritage.parent.tsx"
- },
- "object-member": {
- "begin": "[a-zA-Z_$][\\w$]*\\s*:",
- "end": "(?=,|\\})",
- "name": "meta.object.member.tsx",
"patterns": [
{
"include": "#expression"
}
]
},
- "object-name": {
- "captures": {
+ "switch-block": {
+ "name": "switch-block.expr.tsx",
+ "begin": "\\{",
+ "beginCaptures": {
"0": {
- "name": "entity.name.class.tsx"
+ "name": "punctuation.definition.block.tsx"
}
},
- "match": "[a-zA-Z_$][\\w$]*",
- "name": "meta.object.name.tsx"
- },
- "parameter-name": {
- "captures": {
- "1": {
- "name": "storage.modifier.tsx"
- },
- "2": {
- "name": "keyword.others.tsx"
- },
- "3": {
- "name": "variable.parameter.tsx"
+ "end": "(?=\\})",
+ "patterns": [
+ {
+ "include": "#case-clause"
},
- "4": {
- "name": "keyword.others.tsx"
+ {
+ "include": "#statements"
}
- },
- "match": "(?:\\s*\\b(public|private|protected)\\b\\s+)?(\\.\\.\\.)?\\s*([a-zA-Z_$][\\w$]*)\\s*(\\??)",
- "name": "parameter.name.tsx"
+ ]
},
- "paren-expression": {
- "begin": "\\(",
+ "case-clause": {
+ "name": "case-clause.expr.tsx",
+ "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$|\\.)",
"beginCaptures": {
- "0": {
- "name": "meta.brace.paren.tsx"
+ "1": {
+ "name": "keyword.control.switch.tsx"
}
},
- "end": "\\)",
+ "end": ":",
"endCaptures": {
"0": {
- "name": "meta.brace.paren.tsx"
+ "name": "punctuation.definition.section.case-statement.tsx"
}
},
"patterns": [
@@ -1047,479 +2221,2015 @@
}
]
},
- "property-accessor": {
- "match": "\\b(get|set)\\b",
- "name": "storage.type.property.tsx"
+ "switch-statement": {
+ "name": "switch-statement.expr.tsx",
+ "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.block.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#switch-expression"
+ },
+ {
+ "include": "#switch-block"
+ }
+ ]
},
- "qstring-double": {
- "begin": "\"",
- "end": "\"|(?:[^\\\\\\n]$)",
- "name": "string.double.tsx",
+ "support-objects": {
"patterns": [
{
- "include": "#string-character-escape"
+ "name": "variable.language.arguments.tsx",
+ "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
+ },
+ {
+ "name": "support.class.builtin.tsx",
+ "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator\n |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy\n |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray\n |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
+ },
+ {
+ "name": "support.class.error.tsx",
+ "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
+ },
+ {
+ "name": "support.function.tsx",
+ "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|\n isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\() "
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.constant.math.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "3": {
+ "name": "support.function.math.tsx"
+ },
+ "4": {
+ "name": "support.constant.property.math.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.class.console.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "3": {
+ "name": "support.function.console.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.constant.json.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "3": {
+ "name": "support.function.json.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "support.variable.property.tsx"
+ },
+ "3": {
+ "name": "support.constant.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.variable.dom.tsx"
+ },
+ "2": {
+ "name": "support.class.dom.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "support.constant.dom.tsx"
+ },
+ "3": {
+ "name": "support.variable.property.dom.tsx"
+ }
+ }
+ },
+ {
+ "name": "support.class.node.tsx",
+ "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
+ },
+ {
+ "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.variable.object.process.tsx"
+ },
+ "2": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "3": {
+ "name": "support.variable.property.process.tsx"
+ },
+ "4": {
+ "name": "support.function.process.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
+ "captures": {
+ "1": {
+ "name": "support.type.object.module.tsx"
+ },
+ "2": {
+ "name": "support.type.object.module.tsx"
+ },
+ "3": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "4": {
+ "name": "support.type.object.module.tsx"
+ }
+ }
+ },
+ {
+ "name": "support.variable.object.node.tsx",
+ "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
+ },
+ {
+ "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "support.function.event-handler.tsx"
+ },
+ "3": {
+ "name": "support.function.tsx"
+ },
+ "4": {
+ "name": "support.function.dom.tsx"
+ }
+ }
}
]
},
- "qstring-single": {
- "begin": "'",
- "end": "\\'|(?:[^\\\\\\n]$)",
- "name": "string.single.tsx",
+ "function-call": {
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "end": "(?<=\\))(?!(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
"patterns": [
{
- "include": "#string-character-escape"
+ "name": "meta.function-call.tsx",
+ "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\.\\s*)*|(\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
+ "end": "(?=\\s*(<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\()",
+ "patterns": [
+ {
+ "include": "#literal"
+ },
+ {
+ "include": "#support-objects"
+ },
+ {
+ "include": "#object-identifiers"
+ },
+ {
+ "include": "#punctuation-accessor"
+ },
+ {
+ "name": "entity.name.function.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)"
+ }
+ ]
+ },
+ {
+ "include": "#comment"
+ },
+ {
+ "name": "meta.type.parameters.tsx",
+ "begin": "\\<",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.typeparameters.begin.tsx"
+ }
+ },
+ "end": "\\>",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.typeparameters.end.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#type"
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ {
+ "include": "#paren-expression"
}
]
},
- "regex": {
- "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
- "end": "$|(/)[igm]*",
- "name": "string.regex.tsx",
+ "identifiers": {
"patterns": [
{
- "match": "\\\\.",
- "name": "constant.character.escape.tsx"
+ "include": "#object-identifiers"
+ },
+ {
+ "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n))",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "entity.name.function.tsx"
+ }
+ }
+ },
+ {
+ "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "variable.other.constant.property.tsx"
+ }
+ }
+ },
+ {
+ "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "variable.other.property.tsx"
+ }
+ }
+ },
+ {
+ "name": "variable.other.constant.tsx",
+ "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
},
{
- "match": "\\[(\\\\\\]|[^\\]])*\\]",
- "name": "constant.character.class.tsx"
+ "name": "variable.other.readwrite.tsx",
+ "match": "[_$[:alpha:]][_$[:alnum:]]*"
}
]
},
- "relational-operator": {
- "match": "===|!==|==|!=|<=|>=|<>|=|<|>",
- "name": "keyword.operator.comparison.tsx"
+ "object-identifiers": {
+ "patterns": [
+ {
+ "name": "support.class.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
+ },
+ {
+ "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "punctuation.accessor.tsx"
+ },
+ "2": {
+ "name": "variable.other.constant.object.property.tsx"
+ },
+ "3": {
+ "name": "variable.other.object.property.tsx"
+ }
+ }
+ },
+ {
+ "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
+ "captures": {
+ "1": {
+ "name": "variable.other.constant.object.tsx"
+ },
+ "2": {
+ "name": "variable.other.object.tsx"
+ }
+ }
+ }
+ ]
},
- "return-type": {
- "begin": "(?<=\\))\\s*:",
- "end": "(?=$)|(?=\\{|;|//)",
- "name": "meta.return.type.tsx",
+ "cast": {
"patterns": [
{
- "include": "#type"
+ "include": "#jsx"
}
]
},
- "static-modifier": {
- "match": "\\b(static)\\b",
- "name": "keyword.other.tsx"
+ "new-expr": {
+ "name": "new.expr.tsx",
+ "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$|\\.)",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.operator.new.tsx"
+ }
+ },
+ "end": "(?<=\\))|(?=[;),}]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$|\\.))|((?<!\\.|\\$)\\bfunction((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
+ "patterns": [
+ {
+ "include": "#paren-expression"
+ },
+ {
+ "include": "#class-or-interface-declaration"
+ },
+ {
+ "include": "#type"
+ }
+ ]
},
- "storage-keyword": {
- "match": "\\b(var|let|function|const|module|namespace|void|export)\\b",
- "name": "storage.type.tsx"
+ "object-member": {
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#object-literal-method-declaration"
+ },
+ {
+ "name": "meta.object.member.tsx",
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "name": "meta.object-literal.key.tsx",
+ "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*:)",
+ "end": ":",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.separator.key-value.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#string"
+ },
+ {
+ "include": "#array-literal"
+ }
+ ]
+ },
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.tsx",
+ "begin": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(:)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.tsx"
+ },
+ "1": {
+ "name": "constant.numeric.decimal.tsx"
+ },
+ "2": {
+ "name": "punctuation.separator.key-value.tsx"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.tsx",
+ "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*(\n ((async\\s+)?(\n (function\\s*[(<]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ([(]\\s*(([)]\\s*:)|([_$[:alpha:]][_$[:alnum:]]*\\s*:)|(\\.\\.\\.) )) |\n ([<]\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s*[^=>])|(\\s*[,]))) |\n ((<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)\n ))\n)))",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.tsx"
+ },
+ "1": {
+ "name": "entity.name.function.tsx"
+ },
+ "2": {
+ "name": "punctuation.separator.key-value.tsx"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.tsx",
+ "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
+ "beginCaptures": {
+ "0": {
+ "name": "meta.object-literal.key.tsx"
+ },
+ "1": {
+ "name": "punctuation.separator.key-value.tsx"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.tsx",
+ "begin": "\\.\\.\\.",
+ "beginCaptures": {
+ "0": {
+ "name": "keyword.operator.spread.tsx"
+ }
+ },
+ "end": "(?=,|\\})",
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
+ },
+ {
+ "name": "meta.object.member.tsx",
+ "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
+ "captures": {
+ "1": {
+ "name": "variable.other.readwrite.tsx"
+ }
+ }
+ },
+ {
+ "include": "#punctuation-comma"
+ }
+ ]
},
- "string": {
- "name": "string.tsx",
+ "expression-operators": {
"patterns": [
{
- "include": "#qstring-single"
+ "name": "keyword.control.flow.tsx",
+ "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$|\\.)"
},
{
- "include": "#qstring-double"
+ "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$|\\.)(?:\\s*(\\*))?",
+ "captures": {
+ "1": {
+ "name": "keyword.control.flow.tsx"
+ },
+ "2": {
+ "name": "keyword.generator.asterisk.tsx"
+ }
+ }
+ },
+ {
+ "name": "keyword.operator.expression.delete.tsx",
+ "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.in.tsx",
+ "match": "(?<!\\.|\\$)\\bin\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.of.tsx",
+ "match": "(?<!\\.|\\$)\\bof\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.expression.instanceof.tsx",
+ "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$|\\.)"
+ },
+ {
+ "name": "keyword.operator.new.tsx",
+ "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$|\\.)"
+ },
+ {
+ "include": "#typeof-operator"
+ },
+ {
+ "name": "keyword.operator.expression.void.tsx",
+ "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$|\\.)"
+ },
+ {
+ "begin": "(?<!\\.|\\$)\\b(as)\\s+",
+ "beginCaptures": {
+ "1": {
+ "name": "keyword.control.as.tsx"
+ }
+ },
+ "end": "(?=$|^|[;,:})\\]])",
+ "patterns": [
+ {
+ "include": "#type"
+ }
+ ]
+ },
+ {
+ "name": "keyword.operator.spread.tsx",
+ "match": "\\.\\.\\."
+ },
+ {
+ "name": "keyword.operator.assignment.compound.tsx",
+ "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
+ },
+ {
+ "name": "keyword.operator.assignment.compound.bitwise.tsx",
+ "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
+ },
+ {
+ "name": "keyword.operator.bitwise.shift.tsx",
+ "match": "<<|>>>|>>"
+ },
+ {
+ "name": "keyword.operator.comparison.tsx",
+ "match": "===|!==|==|!="
+ },
+ {
+ "name": "keyword.operator.relational.tsx",
+ "match": "<=|>=|<>|<|>"
+ },
+ {
+ "name": "keyword.operator.logical.tsx",
+ "match": "\\!|&&|\\|\\|"
+ },
+ {
+ "name": "keyword.operator.bitwise.tsx",
+ "match": "\\&|~|\\^|\\|"
+ },
+ {
+ "name": "keyword.operator.assignment.tsx",
+ "match": "\\="
+ },
+ {
+ "name": "keyword.operator.decrement.tsx",
+ "match": "--"
+ },
+ {
+ "name": "keyword.operator.increment.tsx",
+ "match": "\\+\\+"
+ },
+ {
+ "name": "keyword.operator.arithmetic.tsx",
+ "match": "%|\\*|/|-|\\+"
+ },
+ {
+ "match": "(?<=[_$[:alnum:])])\\s*(/)(?![/*])",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.arithmetic.tsx"
+ }
+ }
}
]
},
- "string-character-escape": {
- "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
- "name": "constant.character.escape"
+ "typeof-operator": {
+ "name": "keyword.operator.expression.typeof.tsx",
+ "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$|\\.)"
},
- "switch-block": {
- "begin": "{",
- "end": "(?=\\})",
- "name": "switch-block.expr.tsx",
+ "arrow-function": {
"patterns": [
{
- "include": "#expression"
+ "name": "meta.arrow.tsx",
+ "match": "(?:(?<!\\.|\\$)(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
+ "captures": {
+ "1": {
+ "name": "storage.modifier.async.tsx"
+ },
+ "2": {
+ "name": "variable.parameter.tsx"
+ }
+ }
+ },
+ {
+ "name": "meta.arrow.tsx",
+ "begin": "(?x) (?:\n (?<!\\.|\\$)(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n (\n [(]\\s*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n ) |\n (\n [<]\\s*[_$[:alpha:]][_$[:alnum:]]*\\s+extends\\s*[^=>] # < typeparam extends \n ) |\n # arrow function possible to detect only with => on same line\n (\n (<([^<>=]|=[^<]|\\<([^=<>]|=[^<])+\\>)+>\\s*)? # typeparameters\n \\(([^()]|\\([^()]*\\))*\\) # parameteres\n (\\s*:\\s*(.)*)? # return type\n \\s*=> # arrow operator\n )\n )\n)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.modifier.async.tsx"
+ }
+ },
+ "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#type-parameters"
+ },
+ {
+ "include": "#function-parameters"
+ },
+ {
+ "include": "#arrow-return-type"
+ }
+ ]
+ },
+ {
+ "name": "meta.arrow.tsx",
+ "begin": "=>",
+ "beginCaptures": {
+ "0": {
+ "name": "storage.type.function.arrow.tsx"
+ }
+ },
+ "end": "(?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S))",
+ "patterns": [
+ {
+ "include": "#decl-block"
+ },
+ {
+ "include": "#expression"
+ }
+ ]
}
]
},
- "switch-expression": {
- "begin": "\\b(switch)\\b\\s*\\(",
+ "arrow-return-type": {
+ "name": "meta.return.type.arrow.tsx",
+ "begin": "(?<=\\))\\s*(:)",
"beginCaptures": {
"1": {
- "name": "keyword.control.tsx"
+ "name": "keyword.operator.type.annotation.tsx"
}
},
- "end": "\\)",
- "name": "switch-expression.expr.tsx",
+ "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
"patterns": [
{
- "include": "#expression"
- }
- ]
- },
- "switch-statement": {
- "begin": "(?=\\bswitch\\b\\s*\\()",
- "end": "}",
- "name": "switch-statement.expr.tsx",
- "patterns": [
+ "begin": "(?<=[:])(?=\\s*\\{)",
+ "end": "(?<=\\})",
+ "patterns": [
+ {
+ "include": "#type-object"
+ }
+ ]
+ },
{
- "include": "#switch-expression"
+ "include": "#type-predicate-operator"
},
{
- "include": "#switch-block"
+ "include": "#type"
}
]
},
- "template": {
- "begin": "`",
+ "punctuation-comma": {
+ "name": "punctuation.separator.comma.tsx",
+ "match": ","
+ },
+ "punctuation-semicolon": {
+ "name": "punctuation.terminator.statement.tsx",
+ "match": ";"
+ },
+ "punctuation-accessor": {
+ "name": "punctuation.accessor.tsx",
+ "match": "\\."
+ },
+ "paren-expression": {
+ "begin": "\\(",
"beginCaptures": {
"0": {
- "name": "string.template.tsx"
+ "name": "meta.brace.round.tsx"
}
},
- "end": "`",
+ "end": "\\)",
"endCaptures": {
"0": {
- "name": "string.template.tsx"
+ "name": "meta.brace.round.tsx"
}
},
- "name": "meta.template.tsx",
"patterns": [
{
- "include": "#template-substitution-element"
+ "include": "#expression"
},
{
- "include": "#template-string-contents"
+ "include": "#punctuation-comma"
}
]
},
- "template-string-contents": {
- "begin": ".*?",
- "end": "(?=(\\$\\{|`))",
- "name": "string.template.tsx",
+ "qstring-double": {
+ "name": "string.quoted.double.tsx",
+ "begin": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.tsx"
+ }
+ },
+ "end": "(\")|((?:[^\\\\\\n])$)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.tsx"
+ },
+ "2": {
+ "name": "invalid.illegal.newline.tsx"
+ }
+ },
"patterns": [
{
"include": "#string-character-escape"
}
]
},
- "template-substitution-element": {
- "begin": "\\$\\{",
+ "qstring-single": {
+ "name": "string.quoted.single.tsx",
+ "begin": "'",
"beginCaptures": {
"0": {
- "name": "keyword.others.tsx"
+ "name": "punctuation.definition.string.begin.tsx"
}
},
- "end": "\\}",
+ "end": "(\\')|((?:[^\\\\\\n])$)",
"endCaptures": {
- "0": {
- "name": "keyword.others.tsx"
+ "1": {
+ "name": "punctuation.definition.string.end.tsx"
+ },
+ "2": {
+ "name": "invalid.illegal.newline.tsx"
}
},
- "name": "template.element.tsx",
"patterns": [
{
- "include": "#expression"
+ "include": "#string-character-escape"
}
]
},
- "ternary-expression": {
- "begin": "(?=\\?)",
- "end": "(?=$|[;,])",
+ "regex": {
"patterns": [
{
- "include": "#ternary-operator"
+ "name": "string.regexp.tsx",
+ "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.begin.tsx"
+ }
+ },
+ "end": "(/)([gimuy]*)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.tsx"
+ },
+ "2": {
+ "name": "keyword.other.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
},
{
- "include": "#expression-type"
- }
- ]
- },
- "ternary-operator": {
- "begin": "(\\?)",
- "end": "(:)",
- "patterns": [
- {
- "include": "#expression-type"
+ "name": "string.regexp.tsx",
+ "begin": "(?<![_$[:alnum:])])\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/(?![\\/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.tsx"
+ }
+ },
+ "end": "(/)([gimuy]*)",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.string.end.tsx"
+ },
+ "2": {
+ "name": "keyword.other.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
}
]
},
- "this-literal": {
- "match": "\\b(this)\\b",
- "name": "constant.language.this.tsx"
- },
- "type": {
- "name": "meta.type.tsx",
+ "regexp": {
"patterns": [
{
- "include": "#type-primitive"
+ "name": "keyword.control.anchor.regexp",
+ "match": "\\\\[bB]|\\^|\\$"
},
{
- "include": "#type-parameters"
+ "name": "keyword.other.back-reference.regexp",
+ "match": "\\\\[1-9]\\d*"
},
{
- "include": "#type-tuple"
+ "name": "keyword.operator.quantifier.regexp",
+ "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
},
{
- "include": "#type-object"
+ "name": "keyword.operator.or.regexp",
+ "match": "\\|"
},
{
- "include": "#type-operator"
+ "name": "meta.group.assertion.regexp",
+ "begin": "(\\()((\\?=)|(\\?!))",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.group.regexp"
+ },
+ "2": {
+ "name": "punctuation.definition.group.assertion.regexp"
+ },
+ "3": {
+ "name": "meta.assertion.look-ahead.regexp"
+ },
+ "4": {
+ "name": "meta.assertion.negative-look-ahead.regexp"
+ }
+ },
+ "end": "(\\))",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.group.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
},
{
- "include": "#type-paren-or-function-type-parameters"
+ "name": "meta.group.regexp",
+ "begin": "\\((\\?:)?",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.group.regexp"
+ },
+ "1": {
+ "name": "punctuation.definition.group.capture.regexp"
+ }
+ },
+ "end": "\\)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.group.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#regexp"
+ }
+ ]
},
{
- "include": "#type-function-return-type"
+ "name": "constant.other.character-class.set.regexp",
+ "begin": "(\\[)(\\^)?",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.character-class.regexp"
+ },
+ "2": {
+ "name": "keyword.operator.negation.regexp"
+ }
+ },
+ "end": "(\\])",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.character-class.regexp"
+ }
+ },
+ "patterns": [
+ {
+ "name": "constant.other.character-class.range.regexp",
+ "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
+ "captures": {
+ "1": {
+ "name": "constant.character.numeric.regexp"
+ },
+ "2": {
+ "name": "constant.character.control.regexp"
+ },
+ "3": {
+ "name": "constant.character.escape.backslash.regexp"
+ },
+ "4": {
+ "name": "constant.character.numeric.regexp"
+ },
+ "5": {
+ "name": "constant.character.control.regexp"
+ },
+ "6": {
+ "name": "constant.character.escape.backslash.regexp"
+ }
+ }
+ },
+ {
+ "include": "#regex-character-class"
+ }
+ ]
},
{
- "include": "#type-name"
+ "include": "#regex-character-class"
}
]
},
- "type-annotation": {
- "begin": ":",
- "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[a-zA-Z_$])\\s*(?=\\{)",
- "name": "meta.type.annotation.tsx",
+ "regex-character-class": {
"patterns": [
{
- "include": "#expression-operator"
+ "name": "constant.other.character-class.regexp",
+ "match": "\\\\[wWsSdDtrnvf]|\\."
},
{
- "include": "#type"
+ "name": "constant.character.numeric.regexp",
+ "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
},
{
- "include": "#string"
+ "name": "constant.character.control.regexp",
+ "match": "\\\\c[A-Z]"
},
{
- "include": "#comment"
+ "name": "constant.character.escape.backslash.regexp",
+ "match": "\\\\."
}
]
},
- "type-declaration": {
- "begin": "\\b(type)\\b\\s+([a-zA-Z_$][\\w$]*)\\s*",
+ "string": {
+ "patterns": [
+ {
+ "include": "#qstring-single"
+ },
+ {
+ "include": "#qstring-double"
+ }
+ ]
+ },
+ "template": {
+ "name": "string.template.tsx",
+ "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
"beginCaptures": {
"1": {
- "name": "keyword.other.tsx"
+ "name": "entity.name.function.tagged-template.tsx"
},
"2": {
- "name": "entity.name.class.tsx"
+ "name": "punctuation.definition.string.template.begin.tsx"
+ }
+ },
+ "end": "`",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.template.end.tsx"
}
},
- "end": "(?=$|[,);>]|var|type|function|class|interface)",
- "name": "meta.type.declaration.tsx",
"patterns": [
{
- "include": "#type-parameters"
- },
- {
- "include": "#type"
+ "include": "#template-substitution-element"
},
{
- "match": "=\\s*",
- "name": "keyword.operator.comparison.tsx"
+ "include": "#string-character-escape"
}
]
},
- "type-function-return-type": {
- "begin": "=>",
+ "string-character-escape": {
+ "name": "constant.character.escape.tsx",
+ "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
+ },
+ "template-substitution-element": {
+ "name": "meta.template.expression.tsx",
+ "begin": "\\$\\{",
"beginCaptures": {
"0": {
- "name": "keyword.operator.tsx"
+ "name": "punctuation.definition.template-expression.begin.tsx"
+ }
+ },
+ "end": "\\}",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.template-expression.end.tsx"
}
},
- "end": "(?=\\s*[,\\)\\{=;>]|//|$)",
- "name": "meta.type.function.return.tsx",
"patterns": [
{
- "include": "#type"
+ "include": "#expression"
}
]
},
- "type-name": {
- "captures": {
- "1": {
- "name": "entity.name.type.tsx"
+ "literal": {
+ "patterns": [
+ {
+ "include": "#numeric-literal"
+ },
+ {
+ "include": "#boolean-literal"
+ },
+ {
+ "include": "#null-literal"
+ },
+ {
+ "include": "#undefined-literal"
+ },
+ {
+ "include": "#numericConstant-literal"
+ },
+ {
+ "include": "#array-literal"
+ },
+ {
+ "include": "#this-literal"
+ },
+ {
+ "include": "#super-literal"
}
- },
- "match": "[a-zA-Z_$][.\\w$]*",
- "name": "meta.type.name.tsx"
+ ]
},
- "type-object": {
- "begin": "\\{",
+ "array-literal": {
+ "name": "meta.array.literal.tsx",
+ "begin": "\\[",
"beginCaptures": {
"0": {
- "name": "meta.brace.curly.tsx"
+ "name": "meta.brace.square.tsx"
}
},
- "end": "\\}",
+ "end": "\\]",
"endCaptures": {
"0": {
- "name": "meta.brace.curly.tsx"
+ "name": "meta.brace.square.tsx"
}
},
- "name": "meta.object.type.tsx",
"patterns": [
{
- "include": "#comment"
+ "include": "#expression"
},
{
- "include": "#field-declaration"
+ "include": "#punctuation-comma"
+ }
+ ]
+ },
+ "numeric-literal": {
+ "patterns": [
+ {
+ "name": "constant.numeric.hex.tsx",
+ "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
},
{
- "include": "#method-declaration"
+ "name": "constant.numeric.binary.tsx",
+ "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
},
{
- "include": "#indexer-declaration"
+ "name": "constant.numeric.octal.tsx",
+ "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
},
{
- "include": "#type-annotation"
+ "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
+ "captures": {
+ "0": {
+ "name": "constant.numeric.decimal.tsx"
+ },
+ "1": {
+ "name": "meta.delimiter.decimal.period.tsx"
+ },
+ "2": {
+ "name": "meta.delimiter.decimal.period.tsx"
+ },
+ "3": {
+ "name": "meta.delimiter.decimal.period.tsx"
+ },
+ "4": {
+ "name": "meta.delimiter.decimal.period.tsx"
+ },
+ "5": {
+ "name": "meta.delimiter.decimal.period.tsx"
+ },
+ "6": {
+ "name": "meta.delimiter.decimal.period.tsx"
+ }
+ }
}
]
},
- "type-operator": {
- "match": "[.|]",
- "name": "keyword.operator.type.tsx"
- },
- "type-parameters": {
- "begin": "([a-zA-Z_$][\\w$]*)?(<)",
- "beginCaptures": {
- "1": {
- "name": "entity.name.type.tsx"
+ "boolean-literal": {
+ "patterns": [
+ {
+ "name": "constant.language.boolean.true.tsx",
+ "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
},
- "2": {
- "name": "meta.brace.angle.tsx"
+ {
+ "name": "constant.language.boolean.false.tsx",
+ "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
}
- },
- "end": "(?=$)|(>)",
- "endCaptures": {
- "2": {
- "name": "meta.brace.angle.tsx"
+ ]
+ },
+ "null-literal": {
+ "name": "constant.language.null.tsx",
+ "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
+ },
+ "this-literal": {
+ "name": "variable.language.this.tsx",
+ "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
+ },
+ "super-literal": {
+ "name": "variable.language.super.tsx",
+ "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
+ },
+ "undefined-literal": {
+ "name": "constant.language.undefined.tsx",
+ "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
+ },
+ "numericConstant-literal": {
+ "patterns": [
+ {
+ "name": "constant.language.nan.tsx",
+ "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
+ },
+ {
+ "name": "constant.language.infinity.tsx",
+ "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
}
- },
- "name": "meta.type.parameters.tsx",
+ ]
+ },
+ "access-modifier": {
+ "name": "storage.modifier.tsx",
+ "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$|\\.)"
+ },
+ "property-accessor": {
+ "name": "storage.type.property.tsx",
+ "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$|\\.)"
+ },
+ "comment": {
"patterns": [
{
- "match": "\\b(extends)\\b",
- "name": "keyword.other.tsx"
+ "name": "comment.block.documentation.tsx",
+ "begin": "/\\*\\*(?!/)",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.tsx"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#docblock"
+ }
+ ]
},
{
- "include": "#comment"
+ "name": "comment.block.tsx",
+ "begin": "/\\*",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.tsx"
+ }
+ },
+ "end": "\\*/",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.comment.tsx"
+ }
+ }
},
{
- "include": "#type"
+ "begin": "(^[ \\t]+)?(//)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.whitespace.comment.leading.tsx"
+ },
+ "2": {
+ "name": "comment.line.double-slash.tsx punctuation.definition.comment.tsx"
+ }
+ },
+ "end": "(?=^)",
+ "contentName": "comment.line.double-slash.tsx"
}
]
},
- "type-paren-or-function-type-parameters": {
- "begin": "(?:\\b(new)\\b)?\\s*\\(",
+ "directives": {
+ "name": "comment.line.triple-slash.directive.tsx",
+ "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
"beginCaptures": {
"1": {
- "name": "keyword.control.tsx"
+ "name": "punctuation.definition.comment.tsx"
}
},
- "end": "\\)",
- "name": "meta.type.paren.cover.tsx",
+ "end": "(?=^)",
"patterns": [
{
- "include": "#comment"
+ "name": "meta.tag.tsx",
+ "begin": "(<)(reference|amd-dependency|amd-module)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.directive.tsx"
+ },
+ "2": {
+ "name": "entity.name.tag.directive.tsx"
+ }
+ },
+ "end": "/>",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.tag.directive.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "name": "entity.other.attribute-name.directive.tsx",
+ "match": "path|types|no-default-lib|name"
+ },
+ {
+ "name": "keyword.operator.assignment.tsx",
+ "match": "="
+ },
+ {
+ "include": "#string"
+ }
+ ]
+ }
+ ]
+ },
+ "docblock": {
+ "patterns": [
+ {
+ "match": "(?x)\n((@)access)\n\\s+\n(private|protected|public)\n\\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "constant.language.access-type.jsdoc"
+ }
+ }
},
{
- "include": "#type"
+ "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "5": {
+ "name": "constant.other.email.link.underline.jsdoc"
+ },
+ "6": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "4": {
+ "name": "keyword.operator.control.jsdoc"
+ },
+ "5": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "meta.example.jsdoc",
+ "begin": "((@)example)\\s+",
+ "end": "(?=@|\\*/)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "^\\s\\*\\s+"
+ },
+ {
+ "contentName": "constant.other.description.jsdoc",
+ "begin": "\\G(<)caption(>)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.tag.inline.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ },
+ "end": "(</)caption(>)|(?=\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "entity.name.tag.inline.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.angle.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.angle.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "[^\\s@*](?:[^*]|\\*[^/])*",
+ "captures": {
+ "0": {
+ "name": "source.embedded.tsx"
+ }
+ }
+ }
+ ]
+ },
+ {
+ "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "constant.language.symbol-type.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!https?://)\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.link.underline.jsdoc"
+ },
+ "4": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(?:\n ([A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]*) # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* (,) \\s*\n ([A-Za-z_$]\n [\\w$.\\[\\]]*)\n )*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.delimiter.object.comma.jsdoc"
+ },
+ "5": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "begin": "((@)typedef)\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ },
+ {
+ "name": "entity.name.type.instance.jsdoc",
+ "match": "(?:[^@\\s*/]|\\*[^/])+"
+ }
+ ]
+ },
+ {
+ "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ },
+ {
+ "name": "variable.other.jsdoc",
+ "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
+ },
+ {
+ "name": "variable.other.jsdoc",
+ "begin": "\\[",
+ "end": "\\]|(?=\\*/)",
+ "patterns": [
+ {
+ "match": "(=)((?:[^\\]*]|\\*[^/])*)",
+ "captures": {
+ "1": {
+ "name": "keyword.operator.assignment.jsdoc"
+ },
+ "2": {
+ "name": "source.embedded.tsx"
+ }
+ }
+ },
+ {
+ "include": "#brackets"
+ },
+ {
+ "include": "#quotes"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "begin": "((@)(?:define|enum|exception|implements|modifies|namespace|private|protected|returns?|suppress|throws|type))\\s+(?={)",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ },
+ "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
+ "patterns": [
+ {
+ "include": "#jsdoctype"
+ }
+ ]
+ },
+ {
+ "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "entity.name.type.instance.jsdoc"
+ }
+ }
+ },
+ {
+ "contentName": "variable.other.jsdoc",
+ "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
+ "beginCaptures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ },
+ "4": {
+ "name": "punctuation.definition.string.begin.jsdoc"
+ }
+ },
+ "end": "(\\3)|(?=$|\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "variable.other.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.string.end.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
+ "captures": {
+ "1": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ },
+ "3": {
+ "name": "variable.other.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "storage.type.class.jsdoc",
+ "match": "(?x) (@) (?:abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|global|host|ignore|implements|implicitCast|inherit[Dd]oc|inner|instance|interface|kind |lends|license|listens|main|member|memberof!?|method|mixes|mixins?|modifies|module|name|namespace |noalias|nocollapse|nocompile|nosideeffects|override|overview|package|param|preserve|private|prop |property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule |summary|suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce) \\b",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.block.tag.jsdoc"
+ }
+ }
},
{
- "include": "#function-type-parameters"
+ "include": "#inline-tags"
}
]
},
- "type-primitive": {
+ "brackets": {
+ "patterns": [
+ {
+ "begin": "{",
+ "end": "}|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ },
+ {
+ "begin": "\\[",
+ "end": "\\]|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ },
+ "inline-tags": {
+ "patterns": [
+ {
+ "name": "constant.other.description.jsdoc",
+ "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.bracket.square.begin.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.square.end.jsdoc"
+ }
+ }
+ },
+ {
+ "name": "entity.name.type.instance.jsdoc",
+ "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.jsdoc"
+ },
+ "2": {
+ "name": "storage.type.class.jsdoc"
+ },
+ "3": {
+ "name": "punctuation.definition.inline.tag.jsdoc"
+ }
+ },
+ "end": "}|(?=\\*/)",
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.bracket.curly.end.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
+ "captures": {
+ "1": {
+ "name": "variable.other.link.underline.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.separator.pipe.jsdoc"
+ }
+ }
+ },
+ {
+ "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
+ "captures": {
+ "1": {
+ "name": "variable.other.description.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.separator.pipe.jsdoc"
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "quotes": {
+ "patterns": [
+ {
+ "begin": "'",
+ "end": "'|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#quotes"
+ }
+ ]
+ },
+ {
+ "begin": "\"",
+ "end": "\"|(?=\\*/)",
+ "patterns": [
+ {
+ "include": "#quotes"
+ }
+ ]
+ }
+ ]
+ },
+ "jsdoctype": {
+ "patterns": [
+ {
+ "name": "invalid.illegal.type.jsdoc",
+ "match": "\\G{(?:[^}*]|\\*[^/}])+$"
+ },
+ {
+ "contentName": "entity.name.type.instance.jsdoc",
+ "begin": "\\G({)",
+ "beginCaptures": {
+ "0": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "1": {
+ "name": "punctuation.definition.bracket.curly.begin.jsdoc"
+ }
+ },
+ "end": "((}))\\s*|(?=\\*/)",
+ "endCaptures": {
+ "1": {
+ "name": "entity.name.type.instance.jsdoc"
+ },
+ "2": {
+ "name": "punctuation.definition.bracket.curly.end.jsdoc"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#brackets"
+ }
+ ]
+ }
+ ]
+ },
+ "jsx-tag-attributes": {
+ "patterns": [
+ {
+ "include": "#jsx-tag-attribute-name"
+ },
+ {
+ "include": "#jsx-tag-attribute-assignment"
+ },
+ {
+ "include": "#jsx-string-double-quoted"
+ },
+ {
+ "include": "#jsx-string-single-quoted"
+ },
+ {
+ "include": "#jsx-evaluated-code"
+ }
+ ]
+ },
+ "jsx-tag-attribute-name": {
+ "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
"captures": {
"1": {
- "name": "support.type.tsx"
+ "name": "entity.other.attribute-name.tsx"
+ }
+ }
+ },
+ "jsx-tag-attribute-assignment": {
+ "name": "keyword.operator.assignment.tsx",
+ "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
+ },
+ "jsx-string-double-quoted": {
+ "name": "string.quoted.double.tsx",
+ "begin": "\"",
+ "end": "\"",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.begin.tsx"
+ }
+ },
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.definition.string.end.tsx"
}
},
- "match": "\\b(string|number|boolean|symbol|any|void)\\b",
- "name": "meta.type.primitive.tsx"
+ "patterns": [
+ {
+ "include": "#jsx-entities"
+ }
+ ]
},
- "type-tuple": {
- "begin": "\\[",
+ "jsx-string-single-quoted": {
+ "name": "string.quoted.single.tsx",
+ "begin": "'",
+ "end": "'",
"beginCaptures": {
"0": {
- "name": "meta.brace.square.tsx"
+ "name": "punctuation.definition.string.begin.tsx"
}
},
- "end": "\\]",
"endCaptures": {
"0": {
- "name": "meta.brace.square.tsx"
+ "name": "punctuation.definition.string.end.tsx"
}
},
- "name": "meta.type.tuple.tsx",
"patterns": [
{
- "include": "#type"
+ "include": "#jsx-entities"
+ }
+ ]
+ },
+ "jsx-entities": {
+ "patterns": [
+ {
+ "name": "constant.character.entity.tsx",
+ "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
+ "captures": {
+ "1": {
+ "name": "punctuation.definition.entity.tsx"
+ },
+ "3": {
+ "name": "punctuation.definition.entity.tsx"
+ }
+ }
},
{
- "include": "#comment"
+ "name": "invalid.illegal.bad-ampersand.tsx",
+ "match": "&"
}
]
},
- "undefined-literal": {
- "match": "\\b(undefined)\\b",
- "name": "constant.language.tsx"
+ "jsx-evaluated-code": {
+ "name": "meta.embedded.expression.tsx",
+ "begin": "\\{",
+ "end": "\\}",
+ "beginCaptures": {
+ "0": {
+ "name": "punctuation.section.embedded.begin.tsx"
+ }
+ },
+ "endCaptures": {
+ "0": {
+ "name": "punctuation.section.embedded.end.tsx"
+ }
+ },
+ "patterns": [
+ {
+ "include": "#expression"
+ }
+ ]
},
- "var-expr": {
- "begin": "(?<!\\()\\s*\\b(var|let|const(?!\\s+enum))\\b",
+ "jsx-tag-attributes-illegal": {
+ "name": "invalid.illegal.attribute.tsx",
+ "match": "\\S+"
+ },
+ "jsx-tag-without-attributes": {
+ "name": "meta.tag.without-attributes.tsx",
+ "begin": "(<)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
+ "end": "(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>)",
"beginCaptures": {
"1": {
- "name": "storage.type.tsx"
+ "name": "punctuation.definition.tag.begin.tsx"
+ },
+ "2": {
+ "name": "entity.name.tag.tsx"
+ },
+ "3": {
+ "name": "support.class.component.tsx"
+ },
+ "4": {
+ "name": "punctuation.definition.tag.end.tsx"
}
},
- "end": "(?=$|;)",
- "name": "meta.var.expr.tsx",
+ "endCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.tsx"
+ },
+ "2": {
+ "name": "entity.name.tag.tsx"
+ },
+ "3": {
+ "name": "support.class.component.tsx"
+ },
+ "4": {
+ "name": "punctuation.definition.tag.end.tsx"
+ }
+ },
+ "contentName": "meta.jsx.children.tsx",
"patterns": [
{
- "include": "#var-single-variable"
+ "include": "#jsx-children"
+ }
+ ]
+ },
+ "jsx-tag-in-expression": {
+ "begin": "(?x)\n (?<=[({\\[,?=>:*]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
+ "end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.tsx"
+ },
+ "1": {
+ "name": "punctuation.definition.tag.end.tsx"
+ },
+ "2": {
+ "name": "punctuation.definition.tag.begin.tsx"
+ },
+ "3": {
+ "name": "entity.name.tag.tsx"
+ },
+ "4": {
+ "name": "support.class.component.tsx"
},
+ "5": {
+ "name": "punctuation.definition.tag.end.tsx"
+ }
+ },
+ "patterns": [
{
- "include": "#comment"
+ "include": "#jsx-tag"
}
]
},
- "var-single-variable": {
- "begin": "\\b([a-zA-Z_$][\\w$]*)\\s*(=?)",
- "beginCaptures": {
+ "jsx-child-tag": {
+ "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
+ "end": "(/>)|(?:(</)\\s*((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\\s*(>))",
+ "endCaptures": {
+ "0": {
+ "name": "meta.tag.tsx"
+ },
"1": {
- "name": "variable.tsx"
+ "name": "punctuation.definition.tag.end.tsx"
+ },
+ "2": {
+ "name": "punctuation.definition.tag.begin.tsx"
+ },
+ "3": {
+ "name": "entity.name.tag.tsx"
+ },
+ "4": {
+ "name": "support.class.component.tsx"
+ },
+ "5": {
+ "name": "punctuation.definition.tag.end.tsx"
}
},
- "end": "(?=$|[;,])",
- "name": "meta.var-single-variable.expr.tsx",
"patterns": [
{
- "include": "#ternary-expression"
+ "include": "#jsx-tag"
+ }
+ ]
+ },
+ "jsx-tag": {
+ "name": "meta.tag.tsx",
+ "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
+ "end": "(?=(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)))",
+ "patterns": [
+ {
+ "begin": "(?x)\n (<)\\s*\n ((?:[a-z][a-z0-9]*|([_$a-zA-Z][-$\\w.]*))(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.begin.tsx"
+ },
+ "2": {
+ "name": "entity.name.tag.tsx"
+ },
+ "3": {
+ "name": "support.class.component.tsx"
+ }
+ },
+ "end": "(?=[/]?>)",
+ "patterns": [
+ {
+ "include": "#comment"
+ },
+ {
+ "include": "#jsx-tag-attributes"
+ },
+ {
+ "include": "#jsx-tag-attributes-illegal"
+ }
+ ]
},
{
- "include": "#type-annotation"
+ "begin": "(>)",
+ "beginCaptures": {
+ "1": {
+ "name": "punctuation.definition.tag.end.tsx"
+ }
+ },
+ "end": "(?=</)",
+ "contentName": "meta.jsx.children.tsx",
+ "patterns": [
+ {
+ "include": "#jsx-children"
+ }
+ ]
+ }
+ ]
+ },
+ "jsx-tag-invalid": {
+ "name": "invalid.illegal.tag.incomplete.tsx",
+ "match": "<\\s*>"
+ },
+ "jsx-children": {
+ "patterns": [
+ {
+ "include": "#jsx-tag-without-attributes"
},
{
- "include": "#string"
+ "include": "#jsx-child-tag"
},
{
- "include": "#comment"
+ "include": "#jsx-tag-invalid"
},
{
- "include": "#expression"
+ "include": "#jsx-evaluated-code"
+ },
+ {
+ "include": "#jsx-entities"
}
]
},
- "variable-initializer": {
- "begin": "(=)",
- "beginCaptures": {
- "1": {
- "name": "keyword.operator.comparison.tsx"
- }
- },
- "end": "(?=$|[,);=])",
+ "jsx": {
"patterns": [
{
- "include": "#expression"
+ "include": "#jsx-tag-without-attributes"
+ },
+ {
+ "include": "#jsx-tag-in-expression"
+ },
+ {
+ "include": "#jsx-tag-invalid"
}
]
}
- },
- "scopeName": "source.tsx",
- "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
- "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/55b86614037e8c754c0657b0cd03f4f90c9498db"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/tsconfig.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/tsconfig.json
index 78925298fe..da4f1bb399 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/tsconfig.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/typescript/tsconfig.json
@@ -1,16 +1,21 @@
{
"compilerOptions": {
- "noLib": true,
- "target": "es5",
+ "target": "es6",
"module": "commonjs",
- "sourceMap": true,
- "sourceRoot": "../src",
- "outDir": "./out"
+ "lib": [
+ "es6",
+ "es2015.promise"
+ ],
+ "outDir": "./out",
+ "strictNullChecks": true,
+ "noImplicitAny": true,
+ "noImplicitReturns": true,
+ "noUnusedLocals": true,
+ "noUnusedParameters": true,
+ "strict": true,
+ "alwaysStrict": true
},
- "exclude": [
- "node_modules",
- "server",
- "out",
- "test/colorize-fixtures"
+ "include": [
+ "src/**/*"
]
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/OSSREADME.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/OSSREADME.json
index 6bc831f98d..accbe07495 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/OSSREADME.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/OSSREADME.json
@@ -1,22 +1,10 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
+
[{
- "name": "textmate/xml.tmbundle",
- "license": "TextMate Bundle License",
- "repositoryURL": "https://github.com/textmate/xml.tmbundle",
- "repositoryRevision": "ff0d3e5",
- "licenseDetail": [
- "Copyright (c) textmate-xml.tmbundle project authors",
- "",
- "If not otherwise specified (see below), files in this repository fall under the following license:",
- "",
- "Permission to copy, use, modify, sell and distribute this",
- "software is granted. This software is provided \"as is\" without",
- "express or implied warranty, and with no claim as to its",
- "suitability for any purpose.",
- "",
- "An exception is made for files in readable text which contain their own license information,",
- "or files where an accompanying file exists (in the same directory) with a \"-license\" suffix added",
- "to the base-name name of the original file, and an extension of txt, html, or similar. For example",
- "\"tidy\" is accompanied by \"tidy-license.txt\"."
- ]
+ "name": "atom/language-xml",
+ "version": "0.0.0",
+ "license": "MIT",
+ "repositoryURL": "https://github.com/atom/language-xml",
+ "description": "The files syntaxes/xml.json and syntaxes/xsl.json were derived from the Atom package https://github.com/atom/language-xml which were originally converted from the TextMate bundle https://github.com/textmate/xml.tmbundle."
+
}]
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/package.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/package.json
index 5ac4bb10a5..401a822ae5 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/package.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/package.json
@@ -84,5 +84,8 @@
"scopeName": "text.xml.xsl",
"path": "./syntaxes/xsl.json"
}]
+ },
+ "scripts": {
+ "update-grammar": "node ../../build/npm/update-grammar.js atom/language-xml grammars/xml.cson ./syntaxes/xml.json grammars/xsl.cson ./syntaxes/xsl.json"
}
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xml.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xml.json
index 20f9199d01..a2006a0d26 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xml.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xml.json
@@ -1,7 +1,13 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xml.cson",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"scopeName": "text.xml",
"name": "XML",
"fileTypes": [
+ "aiml",
"atom",
"axml",
"bpmn",
@@ -21,6 +27,7 @@
"fodt",
"fsproj",
"fxml",
+ "gir",
"glade",
"gpx",
"graphml",
@@ -29,6 +36,7 @@
"isml",
"jmx",
"jsp",
+ "kst",
"launch",
"menu",
"mxml",
@@ -42,10 +50,12 @@
"pubxml",
"pubxml.user",
"rdf",
- "resx",
"rng",
"rss",
+ "sdf",
"shproj",
+ "siml",
+ "sld",
"storyboard",
"svg",
"targets",
@@ -58,7 +68,12 @@
"vcproj.filters",
"vcxproj",
"vcxproj.filters",
+ "wixmsp",
+ "wixmst",
+ "wixobj",
+ "wixout",
"wsdl",
+ "wxs",
"xaml",
"xbl",
"xib",
@@ -70,6 +85,7 @@
"xul",
"ui"
],
+ "firstLineMatch": "(?x)\n# XML declaration\n(?:\n ^ <\\? xml\n\n # VersionInfo\n \\s+ version\n \\s* = \\s*\n (['\"])\n 1 \\. [0-9]+\n \\1\n\n # EncodingDecl\n (?:\n \\s+ encoding\n \\s* = \\s*\n\n # EncName\n (['\"])\n [A-Za-z]\n [-A-Za-z0-9._]*\n \\2\n )?\n\n # SDDecl\n (?:\n \\s+ standalone\n \\s* = \\s*\n (['\"])\n (?:yes|no)\n \\3\n )?\n\n \\s* \\?>\n)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n xml\n (?=[\\s;]|(?<![-*])-\\*-).*?-\\*-\n |\n # Vim\n (?:(?:\\s|^)vi(?:m[<=>]?\\d+|m)?|\\sex)(?=:(?=\\s*set?\\s[^\\n:]+:)|:(?!\\s*set?\\s))(?:(?:\\s|\\s*:\\s*)\\w*(?:\\s*=(?:[^\\n\\\\\\s]|\\\\.)*)?)*[\\s:](?:filetype|ft|syntax)\\s*=\n xml\n (?=\\s|:|$)\n)",
"patterns": [
{
"begin": "(<\\?)\\s*([-_a-zA-Z0-9]+)",
@@ -422,6 +438,5 @@
"end": "--%?>",
"name": "comment.block.xml"
}
- },
- "version": "https://github.com/atom/language-xml/commit/f461d428fb87040cb8a52d87d0b95151b9d3c0cc"
-}
+ }
+} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xsl.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xsl.json
index 8b715b599f..2193c1a957 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xsl.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/VSCodeImport/xml/syntaxes/xsl.json
@@ -1,4 +1,9 @@
{
+ "information_for_contributors": [
+ "This file has been converted from https://github.com/atom/language-xml/blob/master/grammars/xsl.cson",
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
+ "Once accepted there, we are happy to receive an update request."
+ ],
"scopeName": "text.xml.xsl",
"name": "XSL",
"fileTypes": [
@@ -88,6 +93,5 @@
},
"name": "string.quoted.single.xml"
}
- },
- "version": "https://github.com/atom/language-xml/commit/507de2ee7daca60cf02e9e21fbeb92bbae73e280"
+ }
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/CSharp/C#.sublime-syntax b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/CSharp/C#.sublime-syntax
index 561e4debec..dfafc3a212 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/CSharp/C#.sublime-syntax
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/CSharp/C#.sublime-syntax
@@ -101,7 +101,7 @@ contexts:
numbers:
- match: '((\b\d+\.?\d+)|(\.\d+))([eE][+-]?\d*)?(F|f|D|d|M|m)?\b'
scope: constant.numeric.float.source.cs
- - match: '\d+(([eE][+-]?\d*)?(F|f|D|d|M|m)|([eE][+-]?\d*))\b'
+ - match: '\b\d+(([eE][+-]?\d*)?(F|f|D|d|M|m)|([eE][+-]?\d*))\b'
scope: constant.numeric.float.source.cs
- match: '\b0[bB][01_]+(U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?\b'
scope: constant.numeric.binary.source.cs
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/Markdown/Markdown.sublime-syntax b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/Markdown/Markdown.sublime-syntax
new file mode 100644
index 0000000000..515590074d
--- /dev/null
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/syntaxes/Markdown/Markdown.sublime-syntax
@@ -0,0 +1,115 @@
+%YAML 1.2
+---
+# Markdown.sublime-syntax
+#
+# Author:
+# Mike Krüger <mikkrg@microsoft.com>
+#
+# Copyright (c) 2017 Microsoft Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+name: Markdown
+file_extensions:
+ - md
+ - mdown
+ - markdown
+ - markdn
+scope: text.html.markdown
+contexts:
+ main:
+ - include: headers
+ - include: styling
+ - include: quotes
+ - include: code
+ - include: links
+ - include: lists
+ - include: emoji
+ headers:
+ - match: '^(#+)(.*)$'
+ styling:
+ - match: '\*\*(\\*|.)*\*\*'
+ scope: markup.bold
+ - match: '\*(\\*|.)*\*'
+ scope: markup.italic
+ - match: '~~.*~~'
+ scope: markup.underline
+ quotes:
+ - match: '^(>)'
+ captures:
+ 1: punctuation.definition.comment
+ links:
+ - match: '\[(.*)\]\((.*)\)'
+ captures:
+ 1: string.other.link
+ 2: markup.link
+ code:
+ - match: '`[^`]*`'
+ scope: string.other
+ - match: '^`+'
+ scope: string.other
+ push:
+ - match: '^`+'
+ pop: true
+ lists:
+ - match: '^\s*(\*|-|\d+.)'
+ captures:
+ 1: constant.numeric
+ emoji:
+ - match: ':(bowtie|smile|simple_smile|laughing|blush|smiley|relaxed|smirk|heart_eyes|kissing_heart|kissing_closed_eyes|flushed|relieved|satisfied|grin|wink|stuck_out_tongue_winking_eye|stuck_out_tongue_closed_eyes|
+ grinning|kissing|kissing_smiling_eyes|stuck_out_tongue|sleeping|worried|frowning|anguished|open_mouth|grimacing|confused|hushed|expressionless|unamused|sweat_smile|sweat|disappointed_relieved|weary|pensive|
+ disappointed|confounded|fearful|cold_sweat|persevere|cry|sob|joy|astonished|scream|neckbeard|tired_face|angry|rage|triumph|sleepy|yum|mask|sunglasses|dizzy_face|imp|smiling_imp|neutral_face|no_mouth|innocent|
+ alien|yellow_heart|blue_heart|purple_heart|heart|green_heart|broken_heart|heartbeat|heartpulse|two_hearts|revolving_hearts|cupid|sparkling_heart|sparkles|star|star2|dizzy|boom|collision|anger|exclamation|question|
+ grey_exclamation|grey_question|zzz|dash|sweat_drops|notes|musical_note|fire|hankey|poop|shit|\+1|thumbsup|-1|thumbsdown|ok_hand|punch|facepunch|fist|v|wave|hand|raised_hand|open_hands|point_up|point_down|point_left
+ |point_right|raised_hands|pray|point_up_2|clap|muscle|metal|fu|runner|running|couple|family|two_men_holding_hands|two_women_holding_hands|dancer|dancers|ok_woman|no_good|information_desk_person|raising_hand|
+ bride_with_veil|person_with_pouting_face|person_frowning|bow|couplekiss|couple_with_heart|massage|haircut|nail_care|boy|girl|woman|man|baby|older_woman|older_man|person_with_blond_hair|man_with_gua_pi_mao|
+ man_with_turban|construction_worker|cop|angel|princess|smiley_cat|smile_cat|heart_eyes_cat|kissing_cat|smirk_cat|scream_cat|crying_cat_face|joy_cat|pouting_cat|japanese_ogre|japanese_goblin|see_no_evil|
+ hear_no_evil|speak_no_evil|guardsman|skull|feet|lips|kiss|droplet|ear|eyes|nose|tongue|love_letter|bust_in_silhouette|busts_in_silhouette|speech_balloon|thought_balloon|feelsgood|finnadie|goberserk|godmode|
+ hurtrealbad|rage1|rage2|rage3|rage4|suspect|trollface|sunny|umbrella|cloud|snowflake|snowman|zap|cyclone|foggy|ocean|cat|dog|mouse|hamster|rabbit|wolf|frog|tiger|koala|bear|pig|pig_nose|cow|boar|monkey_face|monkey|
+ horse|racehorse|camel|sheep|elephant|panda_face|snake|bird|baby_chick|hatched_chick|hatching_chick|chicken|penguin|turtle|bug|honeybee|ant|beetle|snail|octopus|tropical_fish|fish|whale|whale2|dolphin|cow2|ram|rat|
+ water_buffalo|tiger2|rabbit2|dragon|goat|rooster|dog2|pig2|mouse2|ox|dragon_face|blowfish|crocodile|dromedary_camel|leopard|cat2|poodle|paw_prints|bouquet|cherry_blossom|tulip|four_leaf_clover|rose|sunflower|hibiscus|
+ maple_leaf|leaves|fallen_leaf|herb|mushroom|cactus|palm_tree|evergreen_tree|deciduous_tree|chestnut|seedling|blossom|ear_of_rice|shell|globe_with_meridians|sun_with_face|full_moon_with_face|new_moon_with_face|new_moon|
+ waxing_crescent_moon|first_quarter_moon|waxing_gibbous_moon|full_moon|waning_gibbous_moon|last_quarter_moon|waning_crescent_moon|last_quarter_moon_with_face|first_quarter_moon_with_face|crescent_moon|earth_africa|earth_americas|
+ earth_asia|volcano|milky_way|partly_sunny|octocat|squirrel|bamboo|gift_heart|dolls|school_satchel|mortar_board|flags|fireworks|sparkler|wind_chime|rice_scene|jack_o_lantern|ghost|santa|christmas_tree|gift|bell|no_bell|
+ tanabata_tree|tada|confetti_ball|balloon|crystal_ball|cd|dvd|floppy_disk|camera|video_camera|movie_camera|computer|tv|iphone|phone|telephone|telephone_receiver|pager|fax|minidisc|vhs|sound|speaker|mute|loudspeaker|mega|hourglass
+ |hourglass_flowing_sand|alarm_clock|watch|radio|satellite|loop|mag|mag_right|unlock|lock|lock_with_ink_pen|closed_lock_with_key|key|bulb|flashlight|high_brightness|low_brightness|electric_plug|battery|calling|email|mailbox|postbox|
+ bath|bathtub|shower|toilet|wrench|nut_and_bolt|hammer|seat|moneybag|yen|dollar|pound|euro|credit_card|money_with_wings|e-mail|inbox_tray|outbox_tray|envelope|incoming_envelope|postal_horn|mailbox_closed|mailbox_with_mail|mailbox_with_no_mail|
+ package|door|smoking|bomb|gun|hocho|pill|syringe|page_facing_up|page_with_curl|bookmark_tabs|bar_chart|chart_with_upwards_trend|chart_with_downwards_trend|scroll|clipboard|calendar|date|card_index|file_folder|open_file_folder|scissors|pushpin|
+ paperclip|black_nib|pencil2|straight_ruler|triangular_ruler|closed_book|green_book|blue_book|orange_book|notebook|notebook_with_decorative_cover|ledger|books|bookmark|name_badge|microscope|telescope|newspaper|football|basketball|soccer|baseball|
+ tennis|8ball|rugby_football|bowling|golf|mountain_bicyclist|bicyclist|horse_racing|snowboarder|swimmer|surfer|ski|spades|hearts|clubs|diamonds|gem|ring|trophy|musical_score|musical_keyboard|violin|space_invader|video_game|black_joker|
+ flower_playing_cards|game_die|dart|mahjong|clapper|memo|pencil|book|art|microphone|headphones|trumpet|saxophone|guitar|shoe|sandal|high_heel|lipstick|boot|shirt|tshirt|necktie|womans_clothes|
+ dress|running_shirt_with_sash|jeans|kimono|bikini|ribbon|tophat|crown|womans_hat|mans_shoe|closed_umbrella|briefcase|handbag|pouch|purse|eyeglasses|fishing_pole_and_fish|coffee|tea|sake|baby_bottle|beer|beers|cocktail|tropical_drink|wine_glass|
+ fork_and_knife|pizza|hamburger|fries|poultry_leg|meat_on_bone|spaghetti|curry|fried_shrimp|bento|sushi|fish_cake|rice_ball|rice_cracker|rice|ramen|stew|oden|dango|egg|bread|doughnut|custard|icecream|ice_cream|shaved_ice|birthday|cake|cookie|chocolate_bar|
+ candy|lollipop|honey_pot|apple|green_apple|tangerine|lemon|cherries|grapes|watermelon|strawberry|peach|melon|banana|pear|pineapple|sweet_potato|eggplant|tomato|corn|house|house_with_garden|school|office|post_office|hospital|bank|convenience_store|
+ love_hotel|hotel|wedding|church|department_store|european_post_office|city_sunrise|city_sunset|japanese_castle|european_castle|tent|factory|tokyo_tower|japan|mount_fuji|sunrise_over_mountains|sunrise|stars|statue_of_liberty|bridge_at_night|
+ carousel_horse|rainbow|ferris_wheel|fountain|roller_coaster|ship|speedboat|boat|sailboat|rowboat|anchor|rocket|airplane|helicopter|steam_locomotive|tram|mountain_railway|bike|aerial_tramway|suspension_railway|mountain_cableway|tractor|blue_car|
+ oncoming_automobile|car|red_car|taxi|oncoming_taxi|articulated_lorry|bus|oncoming_bus|rotating_light|police_car|oncoming_police_car|fire_engine|ambulance|minibus|truck|train|station|train2|bullettrain_front|bullettrain_side|light_rail|
+ monorail|railway_car|trolleybus|ticket|fuelpump|vertical_traffic_light|traffic_light|warning|construction|beginner|atm|slot_machine|busstop|barber|hotsprings|checkered_flag|crossed_flags|izakaya_lantern|moyai|circus_tent|performing_arts|
+ round_pushpin|triangular_flag_on_post|jp|kr|cn|us|fr|es|it|ru|gb|uk|de|one|two|three|four|five|six|seven|eight|nine|keycap_ten|1234|zero|hash|symbols|arrow_backward|arrow_down|arrow_forward|arrow_left|capital_abcd|abcd|abc|arrow_lower_left|
+ arrow_lower_right|arrow_right|arrow_up|arrow_upper_left|arrow_upper_right|arrow_double_down|arrow_double_up|arrow_down_small|arrow_heading_down|arrow_heading_up|leftwards_arrow_with_hook|arrow_right_hook|left_right_arrow|arrow_up_down|arrow_up_small|
+ arrows_clockwise|arrows_counterclockwise|rewind|fast_forward|information_source|ok|twisted_rightwards_arrows|repeat|repeat_one|new|top|up|cool|free|ng|cinema|koko|signal_strength|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7a7a|u7981|sa|
+ restroom|mens|womens|baby_symbol|no_smoking|parking|wheelchair|metro|baggage_claim|accept|wc|potable_water|put_litter_in_its_place|secret|congratulations|m|passport_control|left_luggage|customs|ideograph_advantage|cl|sos|id|no_entry_sign|underage|
+ no_mobile_phones|do_not_litter|non-potable_water|no_bicycles|no_pedestrians|children_crossing|no_entry|eight_spoked_asterisk|sparkle|eight_pointed_black_star|heart_decoration|vs|vibration_mode|mobile_phone_off|chart|currency_exchange|aries|taurus|
+ gemini|cancer|leo|virgo|libra|scorpius|sagittarius|capricorn|aquarius|pisces|ophiuchus|six_pointed_star|negative_squared_cross_mark|a|b|ab|o2|diamond_shape_with_a_dot_inside|recycle|end|back|on|soon|clock1|clock130|clock10|clock1030|clock11|clock1130|
+ clock12|clock1230|clock2|clock230|clock3|clock330|clock4|clock430|clock5|clock530|clock6|clock630|clock7|clock730|clock8|clock830|clock9|clock930|heavy_dollar_sign|copyright|registered|tm|x|heavy_exclamation_mark|bangbang|interrobang|o|
+ heavy_multiplication_x|heavy_plus_sign|heavy_minus_sign|heavy_division_sign|white_flower|100|heavy_check_mark|ballot_box_with_check|radio_button|link|curly_loop|wavy_dash|part_alternation_mark|trident|black_small_square|white_small_square|
+ black_medium_small_square|white_medium_small_square|black_medium_square|white_medium_square|black_large_square|white_large_square|white_check_mark|black_square_button|white_square_button|black_circle|white_circle|red_circle|large_blue_circle|
+ large_blue_diamond|large_orange_diamond|small_blue_diamond|small_orange_diamond|small_red_triangle|small_red_triangle_down|shipit):'
+ scope: markup.emoji
+
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/DarkStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/DarkStyle.json
index cc8b3099de..402707fedc 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/DarkStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/DarkStyle.json
@@ -117,10 +117,10 @@
{ "name": "Punctuation", "fore": "aluminium1" },
{ "name": "Punctuation(Brackets)", "fore": "aluminium1" },
- { "name": "Comment(Line)", "fore": "aluminium4" },
- { "name": "Comment(Block)", "fore": "aluminium4" },
+ { "name": "Comment(Line)", "fore": "#7a976b" },
+ { "name": "Comment(Block)", "fore": "#7a976b" },
{ "name": "Comment(Doc)", "fore": "#7a976b" },
- { "name": "Comment(DocTag)", "fore": "#9a8b4e" },
+ { "name": "Comment(DocTag)", "fore": "aluminium4" },
{ "name": "Comment Tag", "fore": "#ff37ff" },
{ "name": "Excluded Code", "fore": "aluminium4" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/FallbackStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/FallbackStyle.json
index 153e0128ce..e53bff7df6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/FallbackStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/FallbackStyle.json
@@ -116,9 +116,9 @@
{ "name": "Comment(Line)", "fore": "comment-gray" },
{ "name": "Comment(Block)", "fore": "comment-gray" },
- { "name": "Comment(Doc)", "fore": "#7a976b" },
- { "name": "Comment(DocTag)", "fore": "#9a8b4e" },
- { "name": "Comment Tag", "fore": "#ff37ff" },
+ { "name": "Comment(Doc)", "fore": "comment-gray" },
+ { "name": "Comment(DocTag)", "fore": "comment-gray" },
+ { "name": "Comment Tag", "fore": "comment-gray" },
{ "name": "Excluded Code", "fore": "comment-gray" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json
index 43de626059..d78fa1c2e6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/GruvboxStyle.json
@@ -108,8 +108,8 @@
{ "name": "Comment(Line)", "fore": "comment" },
{ "name": "Comment(Block)", "fore": "comment" },
- { "name": "Comment(Doc)", "fore": "#617e52" },
- { "name": "Comment(DocTag)", "fore": "#817235" },
+ { "name": "Comment(Doc)", "fore": "comment" },
+ { "name": "Comment(DocTag)", "fore": "comment" },
{ "name": "Comment Tag", "fore": "#ff0dff" },
{ "name": "Excluded Code", "fore": "comment" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/LightStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/LightStyle.json
index 9b4f8e1e17..fbbbb86040 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/LightStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/LightStyle.json
@@ -116,8 +116,8 @@
{ "name": "Comment(Line)", "fore": "comment-gray" },
{ "name": "Comment(Block)", "fore": "comment-gray" },
- { "name": "Comment(Doc)", "fore": "#77a976b" },
- { "name": "Comment(DocTag)", "fore": "#9a8b4e" },
+ { "name": "Comment(Doc)", "fore": "comment-gray" },
+ { "name": "Comment(DocTag)", "fore": "comment-gray" },
{ "name": "Comment Tag", "fore": "#ff37ff" },
{ "name": "Excluded Code", "fore": "comment-gray" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json
index ebeca66e78..f750cb5951 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/MonokaiStyle.json
@@ -115,8 +115,8 @@
{ "name": "Comment(Line)", "fore": "monokai-comment" },
{ "name": "Comment(Block)", "fore": "monokai-comment" },
- { "name": "Comment(Doc)", "fore": "#617e52" },
- { "name": "Comment(DocTag)", "fore": "#817235" },
+ { "name": "Comment(Doc)", "fore": "monokai-comment" },
+ { "name": "Comment(DocTag)", "fore": "monokai-comment" },
{ "name": "Comment Tag", "fore": "#ff0dff" },
{ "name": "Excluded Code", "fore": "monokai-comment" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json
index 72b765db28..383b3f67b6 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/NightshadeStyle.json
@@ -113,7 +113,7 @@
{ "name": "Link Color", "color": "#41e2cb" },
{ "name": "Link Color(Active)", "color": "#41e2cb" }
],
-
+
"text": [
{ "name": "Plain Text", "fore": "NormalVim", "back": "BlackVim" },
{ "name": "Selected Text", "back": "#2647DD" },
@@ -128,8 +128,8 @@
{ "name": "Comment(Line)", "fore": "CommentVim" },
{ "name": "Comment(Block)", "fore": "CommentVim" },
- { "name": "Comment(Doc)", "fore": "#6d8a5e" },
- { "name": "Comment(DocTag)", "fore": "#8d7e41" },
+ { "name": "Comment(Doc)", "fore": "CommentVim" },
+ { "name": "Comment(DocTag)", "fore": "CommentVim" },
{ "name": "Comment Tag", "fore": "#ff21ff" },
{ "name": "Excluded Code", "fore": "CommentVim" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json
index a62e6c790f..68223e0c50 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/OblivionStyle.json
@@ -119,8 +119,8 @@
{ "name": "Comment(Line)", "fore": "aluminium4" },
{ "name": "Comment(Block)", "fore": "aluminium4" },
- { "name": "Comment(Doc)", "fore": "#7a976b" },
- { "name": "Comment(DocTag)", "fore": "#9a8b4e" },
+ { "name": "Comment(Doc)", "fore": "aluminium4" },
+ { "name": "Comment(DocTag)", "fore": "aluminium4" },
{ "name": "Comment Tag", "fore": "#ff37ff" },
{ "name": "Excluded Code", "fore": "aluminium4" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json
index 4fc1a3e63c..ca411840d2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedDarkStyle.json
@@ -108,8 +108,8 @@
{ "name": "Comment(Line)", "fore": "base01" },
{ "name": "Comment(Block)", "fore": "base01" },
- { "name": "Comment(Doc)", "fore": "#59764a" },
- { "name": "Comment(DocTag)", "fore": "#796a2d" },
+ { "name": "Comment(Doc)", "fore": "base01" },
+ { "name": "Comment(DocTag)", "fore": "base01" },
{ "name": "Comment Tag", "fore": "#fd01fd" },
{ "name": "Excluded Code", "fore": "base01" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json
index de5dd14bbb..293e2d814e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/SolarizedLightStyle.json
@@ -94,8 +94,8 @@
{ "name": "Comment(Line)", "fore": "base01" },
{ "name": "Comment(Block)", "fore": "base01" },
- { "name": "Comment(Doc)", "fore": "#59764a" },
- { "name": "Comment(DocTag)", "fore": "#796a2d" },
+ { "name": "Comment(Doc)", "fore": "base01" },
+ { "name": "Comment(DocTag)", "fore": "base01" },
{ "name": "Comment Tag", "fore": "#fd01fd" },
{ "name": "Excluded Code", "fore": "base01" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/TangoStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/TangoStyle.json
index ee363136f3..697d590ab0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/TangoStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/TangoStyle.json
@@ -53,8 +53,8 @@
{ "name": "Comment(Line)", "fore": "aluminium4" },
{ "name": "Comment(Block)", "fore": "aluminium4" },
- { "name": "Comment(Doc)", "fore": "#7a976b" },
- { "name": "Comment(DocTag)", "fore": "#9a8b4e" },
+ { "name": "Comment(Doc)", "fore": "aluminium4" },
+ { "name": "Comment(DocTag)", "fore": "aluminium4" },
{ "name": "Comment Tag", "fore": "#ff37ff" },
{ "name": "Excluded Code", "fore": "aluminium4" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/VisualStudioStyle.json b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/VisualStudioStyle.json
index 705b0ec0fc..f354222aea 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/VisualStudioStyle.json
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.Highlighting/themes/VisualStudioStyle.json
@@ -39,8 +39,8 @@
{ "name": "Comment(Line)", "fore": "comment-green" },
{ "name": "Comment(Block)", "fore": "comment-green" },
- { "name": "Comment(Doc)", "fore": "#3d5a2e" },
- { "name": "Comment(DocTag)", "fore": "#5d4e11" },
+ { "name": "Comment(Doc)", "fore": "comment-green" },
+ { "name": "Comment(DocTag)", "fore": "comment-green" },
{ "name": "Comment Tag", "fore": "#b901b9" },
{ "name": "Excluded Code", "fore": "comment-green" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.TextMate/TextMateFoldingTextEditorExtension.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.TextMate/TextMateFoldingTextEditorExtension.cs
index ae4819fe53..141c1c392e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.TextMate/TextMateFoldingTextEditorExtension.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Editor.TextMate/TextMateFoldingTextEditorExtension.cs
@@ -178,7 +178,7 @@ namespace MonoDevelop.Ide.Editor.TextMate
return foldings;
}
- class FoldSegment : AbstractSegment, IFoldSegment
+ class FoldSegment : AbstractSegment, IFoldSegment, IComparable
{
public string CollapsedText {
get {
@@ -203,6 +203,12 @@ namespace MonoDevelop.Ide.Editor.TextMate
public FoldSegment (int offset, int length) : base (offset, length)
{
}
+
+ int IComparable.CompareTo (object obj)
+ {
+ var segment = (IFoldSegment)obj;
+ return this.Offset != segment.Offset ? this.Offset.CompareTo (segment.Offset) : 0;
+ }
}
}
} \ No newline at end of file
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs
index 1463e22736..d9bd0dab4e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FileProvider.cs
@@ -58,21 +58,21 @@ namespace MonoDevelop.Ide.FindInFiles
public override void BeginReplace (string content, Encoding encoding)
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
undoGroup = editor.OpenUndoGroup ();
});
}
public override void Replace (int offset, int length, string replacement)
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
editor.ReplaceText (offset, length, replacement);
});
}
public override void EndReplace ()
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (undoGroup != null) {
undoGroup.Dispose ();
undoGroup = null;
@@ -182,7 +182,7 @@ namespace MonoDevelop.Ide.FindInFiles
document = await SearchDocument ();
this.encoding = encoding;
if (document != null) {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
undoGroup = document.Editor.OpenUndoGroup ();
});
return;
@@ -195,7 +195,7 @@ namespace MonoDevelop.Ide.FindInFiles
buffer.Remove (offset, length);
buffer.Insert (offset, replacement);
if (document != null) {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
document.Editor.ReplaceText (offset, length, replacement);
});
return;
@@ -205,7 +205,7 @@ namespace MonoDevelop.Ide.FindInFiles
public virtual void EndReplace ()
{
if (document != null) {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (undoGroup != null) {
undoGroup.Dispose ();
undoGroup = null;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
index e083aaf58f..3083309e5f 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.FindInFiles/FindInFilesDialog.cs
@@ -841,14 +841,14 @@ namespace MonoDevelop.Ide.FindInFiles
searchMonitor.PathMode = scope.PathMode;
if (UpdateResultPad != null) {
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
UpdateResultPad (searchMonitor.ResultPad);
});
}
searchMonitor.ReportStatus (scope.GetDescription (options, pattern, null));
if (UpdateStopButton != null) {
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
UpdateStopButton ();
});
}
@@ -884,7 +884,7 @@ namespace MonoDevelop.Ide.FindInFiles
searchMonitor.Log.WriteLine (GettextCatalog.GetString ("Search time: {0} seconds."), (DateTime.Now - timer).TotalSeconds);
}
if (UpdateStopButton != null) {
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
UpdateStopButton ();
});
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs
index 62ec799fc1..afb2191602 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Dialogs/VersionInformationTabPage.cs
@@ -53,14 +53,14 @@ namespace MonoDevelop.Ide.Gui.Dialogs
new System.Threading.Thread (() => {
try {
var info = SystemInformation.GetDescription ().ToArray ();
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (destroyed)
return;
SetText (info);
});
} catch (Exception ex) {
LoggingService.LogError ("Failed to load version information", ex);
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (destroyed)
return;
SetLabel (GettextCatalog.GetString ("Failed to load version information."));
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
index 5d9922f901..d0a706aa11 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.OptionPanels/KeyBindingsPanel.cs
@@ -819,7 +819,7 @@ namespace MonoDevelop.Ide.Gui.OptionPanels
text += "\n\u2022 " + cmd.Category + " \u2013 " + cmd.DisplayName;
}
- tooltipWindow.Text = text;
+ tooltipWindow.Markup = text;
tooltipWindow.Severity = hasConflict ? Tasks.TaskSeverity.Error : Tasks.TaskSeverity.Warning;
tooltipWindow.ShowPopup (keyBindingsTree, hit.ButtonBounds, PopupPosition.Top);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs
index bb6974575f..376eb06181 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Pads.ProjectPad/ProjectSolutionPad.cs
@@ -82,7 +82,7 @@ namespace MonoDevelop.Ide.Gui.Pads.ProjectPad
void OnWindowChanged (object ob, EventArgs args)
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o2, a2) => {
SelectActiveFile ();
});
}
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs
index 82035b410f..cfac69112e 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/BackgroundProgressMonitor.cs
@@ -42,7 +42,7 @@ namespace MonoDevelop.Ide.Gui
{
this.title = title;
if (!iconName.IsNull) {
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
var img = ImageService.GetIcon (iconName, IconSize.Menu);
icon = IdeApp.Workbench.StatusBar.ShowStatusIcon (img);
icon.Title = GettextCatalog.GetString ("Background Progress");
@@ -63,7 +63,7 @@ namespace MonoDevelop.Ide.Gui
else
tip = string.Format ("{0} ({1}%)\n{2}", title, (int)(Progress * 100), CurrentTaskName);
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
if (icon != null)
icon.ToolTip = tip;
});
@@ -72,7 +72,7 @@ namespace MonoDevelop.Ide.Gui
public override void Dispose()
{
base.Dispose ();
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
if (icon != null) {
icon.Dispose ();
icon = null;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
index ea612cd668..d7f2fe48dd 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Document.cs
@@ -974,7 +974,8 @@ namespace MonoDevelop.Ide.Gui
{
RunWhenRealized (() => {
string currentParseFile = GetCurrentParseFileName ();
- if (string.IsNullOrEmpty (currentParseFile) || Editor.IsDisposed)
+ var editor = Editor;
+ if (string.IsNullOrEmpty (currentParseFile) || editor == null || editor.IsDisposed == true)
return;
lock (reparseTimeoutLock) {
CancelParseTimeout ();
@@ -1028,7 +1029,7 @@ namespace MonoDevelop.Ide.Gui
TypeSystemService.ParseProjection (options, mimeType, token).ContinueWith (task => {
if (token.IsCancellationRequested)
return;
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
// this may be called after the document has closed, in that case the OnDocumentParsed event shouldn't be invoked.
var taskResult = task.Result;
if (isClosed || taskResult == null || token.IsCancellationRequested)
@@ -1045,7 +1046,7 @@ namespace MonoDevelop.Ide.Gui
TypeSystemService.ParseFile (options, mimeType, token).ContinueWith (task => {
if (token.IsCancellationRequested)
return;
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
// this may be called after the document has closed, in that case the OnDocumentParsed event shouldn't be invoked.
if (isClosed || task.Result == null || token.IsCancellationRequested)
return;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
index 28b078d663..08f596c6aa 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/SdiWorkspaceWindow.cs
@@ -283,7 +283,7 @@ namespace MonoDevelop.Ide.Gui
tabControl.CurrentTabIndex = tab.Index;
// Focus the tab in the next iteration since presenting the window may take some time
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
DockNotebook.ActiveNotebook = tabControl;
DeepGrabFocus (this.ActiveViewContent.Control);
});
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
index 44ff749e74..1ac3ee7c81 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Projects/DefaultPolicyOptionsDialog.cs
@@ -356,7 +356,7 @@ namespace MonoDevelop.Ide.Projects
} else {
// There are validation errors. Cancel the policy switch
int last = policiesCombo.Active;
- Application.Invoke (delegate {
+ Application.Invoke ((o, args) => {
loading = true;
policiesCombo.Active = last;
loading = false;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
index c63799ea16..87c8440d4b 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Tasks/CommentTasksView.cs
@@ -296,7 +296,7 @@ namespace MonoDevelop.Ide.Tasks
void OnCommentTasksChanged (object sender, CommentTasksChangedEventArgs args)
{
- Application.Invoke (delegate {
+ Application.Invoke ((o, a) => {
foreach (var e in args.Changes) {
//because of parse queueing, it's possible for this event to come in after the solution is closed
//so we track which solutions are currently open so that we don't leak memory by holding
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs
index 535097f973..36db51a996 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/MonoDevelopWorkspace.cs
@@ -179,7 +179,7 @@ namespace MonoDevelop.Ide.TypeSystem
internal void HideStatusIcon ()
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
workspacesLoading--;
if (workspacesLoading == 0 && statusIcon != null) {
statusIcon.Dispose ();
@@ -194,7 +194,7 @@ namespace MonoDevelop.Ide.TypeSystem
internal void ShowStatusIcon ()
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
workspacesLoading++;
if (statusIcon != null)
return;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
index ed8da5693f..ea44ee0cf2 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.TypeSystem/TypeSystemService.cs
@@ -120,7 +120,7 @@ namespace MonoDevelop.Ide.TypeSystem
w.UpdateFileContent (file, text);
}
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (IdeApp.Workbench != null)
foreach (var w in IdeApp.Workbench.Documents)
w.StartReparseThread ();
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
index eae2a2c8bc..d9b864370a 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageNewsFeed.cs
@@ -171,7 +171,7 @@ namespace MonoDevelop.Ide.WelcomePage
}
LoggingService.LogInfo ("Welcome Page updated.");
- Gtk.Application.Invoke (delegate { LoadNews (); });
+ Gtk.Application.Invoke ((o, args) => { LoadNews (); });
} catch (Exception ex) {
var agg = ex as AggregateException;
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
index 94fe5a69cc..f439777a80 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.csproj
@@ -8372,6 +8372,9 @@
<EmbeddedResource Include="icons\prefs-metadata-16~sel%402x.png">
<LogicalName>prefs-metadata-16~sel@2x.png</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="MonoDevelop.Ide.Editor.Highlighting\syntaxes\Markdown\Markdown.sublime-syntax">
+ <LogicalName>Markdown.sublime-syntax</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="MonoDevelop.Ide.Commands\CustomStringTagProvider.cs" />
@@ -9479,6 +9482,7 @@
<Folder Include="MonoDevelop.Components.MainToolbar\Theme\" />
<Folder Include="MonoDevelop.Components\Xwt\" />
<Folder Include="MonoDevelop.Components.AtkCocoaHelper\" />
+ <Folder Include="MonoDevelop.Ide.Editor.Highlighting\syntaxes\Markdown\" />
</ItemGroup>
<ItemGroup>
<Content Include="gtkrc">
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs
index f0788d1b3b..f62bf8f7c0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DefaultWebCertificateProvider.cs
@@ -46,7 +46,7 @@ namespace MonoDevelop.Ide
if (!TrustedCertificates.TryGetValue (certificateFingerprint, out value)) {
using (var handle = new System.Threading.ManualResetEvent (false)) {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
value = MessageService.AskQuestion (
GettextCatalog.GetString ("Untrusted HTTP certificate detected"),
GettextCatalog.GetString ("Do you want to temporarily trust this certificate in order to connect to the server at {0}?", uri),
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs
index 648eb17bb8..191205e8a0 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DispatchService.cs
@@ -48,7 +48,7 @@ namespace MonoDevelop.Ide
{
public override void Post (SendOrPostCallback d, object state)
{
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
d (state);
});
}
@@ -61,7 +61,7 @@ namespace MonoDevelop.Ide
}
var ob = new object ();
lock (ob) {
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
try {
d (state);
} finally {
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
index ae8e0ebcbb..c578c70507 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/MessageService.cs
@@ -479,7 +479,7 @@ namespace MonoDevelop.Ide
return task.Result;
//cancelDialog is used to close dialog when task is finished
var cancelDialog = new CancellationTokenSource ();
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
if (cancelDialog.Token.IsCancellationRequested)
return;
var gm = new GenericMessage (waitMessage, null, cancelDialog.Token);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
index 435f3c735a..a5477722b1 100644
--- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
+++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/RootWorkspace.cs
@@ -939,7 +939,7 @@ namespace MonoDevelop.Ide
NotifyItemAddedGui (item, IsReloading);
else {
bool reloading = IsReloading;
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
NotifyItemAddedGui (item, reloading);
});
}
@@ -973,7 +973,7 @@ namespace MonoDevelop.Ide
NotifyItemRemovedGui (item, IsReloading);
else {
bool reloading = IsReloading;
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o, args) => {
NotifyItemRemovedGui (item, reloading);
});
}
@@ -1093,7 +1093,7 @@ namespace MonoDevelop.Ide
// Delay the notification of this event to ensure that the new project is properly
// registered in the parser database when it is fired
- Gtk.Application.Invoke (delegate {
+ Gtk.Application.Invoke ((o2, a2) => {
if (ItemAddedToSolution != null)
ItemAddedToSolution (sender, args);
});