Include C# textmate grammar. Fixes #19469

This commit is contained in:
Martin Aeschlimann 2017-02-08 13:06:04 +01:00
parent 2cf9b325cb
commit 0fa326c6a1
7 changed files with 6056 additions and 456 deletions

View file

@ -0,0 +1,10 @@
// ATTENTION - THIS DIRECTORY CONTAINS THIRD PARTY OPEN SOURCE MATERIALS:
[
{
"name": "dotnet/csharp-tmLanguage",
"version": "0.1.0",
"license": "MIT",
"repositoryURL": "https://github.com/dotnet/csharp-tmLanguage",
"description": "The file syntaxes/csharp.tmLanguage.json was derived from https://github.com/dotnet/csharp-tmLanguage"
}
]

View file

@ -0,0 +1,27 @@
{
"comments": {
"lineComment": "//",
"blockComment": ["/*", "*/"]
},
"brackets": [
["{", "}"],
["[", "]"],
["(", ")"]
],
"autoClosingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
{ "open": "/*", "close": " */", "notIn": ["string"] }
],
"surroundingPairs": [
["{", "}"],
["[", "]"],
["(", ")"],
["<", ">"],
["'", "'"],
["\"", "\""]
]
}

View file

@ -0,0 +1,35 @@
{
"name": "csharp",
"version": "0.1.0",
"publisher": "vscode",
"engines": {
"vscode": "0.10.x"
},
"scripts": {
"update-grammar": "node ../../build/npm/update-grammar.js dotnet/csharp-tmLanguage grammars/csharp.tmLanguage ./syntaxes/csharp.tmLanguage.json"
},
"contributes": {
"languages": [
{
"id": "csharp",
"extensions": [
".cs",
".csx"
],
"aliases": [
"C#",
"csharp"
],
"configuration": "./language-configuration.json"
}
],
"grammars": [
{
"language": "csharp",
"scopeName": "source.cs",
"path": "./syntaxes/csharp.tmLanguage.json"
}
]
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
using System;
namespace SampleNamespace
{
class TestClass
{
static void Main(string[] args)
{
int[] radii = { 15, 32, 108, 74, 9 };
const double pi = 3.14159;
foreach (int radius in radii) {
double circumference = pi * (2 * radius);
// Display the number of command line arguments:
System.Console.WriteLine("Circumference = {0:N2}", circumference);
}
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff