Skip to content

Commit 8fdf170

Browse files
committed
update grammar script: remove unused properties
1 parent 6b31642 commit 8fdf170

54 files changed

Lines changed: 353 additions & 864 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎build/npm/update-grammar.js‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function download(url, redirectCount) {
4646
let location = response.headers['location'];
4747
if (location) {
4848
console.log("Redirected " + url + " to " + location);
49-
download(location, count+1).then(c, e);
49+
download(location, count + 1).then(c, e);
5050
return;
5151
}
5252
}
@@ -86,7 +86,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
8686
} else if (ext === '.json') {
8787
grammar = JSON.parse(content);
8888
} else {
89-
return Promise.reject(new Error(('Unknown file extension: ' + ext)));
89+
return Promise.reject(new Error('Unknown file extension: ' + ext));
9090
}
9191
if (modifyGrammar) {
9292
modifyGrammar(grammar);
@@ -103,8 +103,10 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
103103
if (info) {
104104
result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
105105
}
106-
for (let key in grammar) {
107-
if (!result.hasOwnProperty(key)) {
106+
107+
let keys = ['name', 'scopeName', 'comment', 'injections', 'patterns', 'repository'];
108+
for (let key of keys) {
109+
if (grammar.hasOwnProperty(key)) {
108110
result[key] = grammar[key];
109111
}
110112
}

‎extensions/bat/syntaxes/batchfile.tmLanguage.json‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/mmims/language-batchfile/commit/3dd105c31484e5975144478dac1aa91d8f51e528",
8-
"scopeName": "source.batchfile",
98
"name": "Batch File",
10-
"fileTypes": [
11-
"bat",
12-
"cmd"
13-
],
9+
"scopeName": "source.batchfile",
1410
"patterns": [
1511
{
1612
"include": "#commands"

‎extensions/clojure/syntaxes/clojure.tmLanguage.json‎

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/atom/language-clojure/commit/ecc790326bc8e14220e4d2d72a392a30876c3219",
8-
"scopeName": "source.clojure",
9-
"fileTypes": [
10-
"boot",
11-
"clj",
12-
"clj.hl",
13-
"cljc",
14-
"cljs",
15-
"cljs.hl",
16-
"cljx",
17-
"clojure",
18-
"edn",
19-
"org",
20-
"joke",
21-
"joker"
22-
],
23-
"foldingStartMarker": "\\(\\s*$",
24-
"foldingStopMarker": "^\\s*\\)",
25-
"firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n boot\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n clojure(script)?\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 clojure\n (?=\\s|:|$)\n)",
268
"name": "Clojure",
9+
"scopeName": "source.clojure",
2710
"patterns": [
2811
{
2912
"include": "#comment"

‎extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/atom/language-coffee-script/commit/a0da2a73ad817e2fc13c2ef8fcd2624017c39610",
8-
"scopeName": "source.coffee",
98
"name": "CoffeeScript",
10-
"fileTypes": [
11-
"coffee",
12-
"Cakefile",
13-
"coffee.erb",
14-
"cson",
15-
"_coffee"
16-
],
17-
"firstLineMatch": "(?x)\n# Hashbang\n^\\#!.*(?:\\s|\\/)\n coffee\n(?:$|\\s)\n|\n# Modeline\n(?i:\n # Emacs\n -\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n coffee\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 coffee\n (?=\\s|:|$)\n)",
9+
"scopeName": "source.coffee",
1810
"patterns": [
1911
{
2012
"match": "(new)\\s+(?:(?:(class)\\s+(\\w+(?:\\.\\w*)*)?)|(\\w+(?:\\.\\w*)*))",

‎extensions/cpp/syntaxes/c.tmLanguage.json‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/atom/language-c/commit/9c0c5f202741a5647025db8d5df5fefba47b036c",
8-
"scopeName": "source.c",
9-
"fileTypes": [
10-
"c",
11-
"h.in",
12-
"xpm"
13-
],
14-
"firstLineMatch": "(?i)-\\*-[^*]*(Mode:\\s*)?C(\\s*;.*?)?\\s*-\\*-",
158
"name": "C",
9+
"scopeName": "source.c",
1610
"patterns": [
1711
{
1812
"include": "#preprocessor-rule-enabled"

‎extensions/cpp/syntaxes/cpp.tmLanguage.json‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f",
8-
"scopeName": "source.cpp",
9-
"fileTypes": [
10-
"cc",
11-
"cpp",
12-
"cp",
13-
"cxx",
14-
"c++",
15-
"cu",
16-
"cuh",
17-
"h",
18-
"hh",
19-
"hpp",
20-
"hxx",
21-
"h++",
22-
"inl",
23-
"ino",
24-
"ipp",
25-
"tcc",
26-
"tpp"
27-
],
28-
"firstLineMatch": "(?i)-\\*-[^*]*(Mode:\\s*)?C\\+\\+(\\s*;.*?)?\\s*-\\*-",
298
"name": "C++",
9+
"scopeName": "source.cpp",
3010
"patterns": [
3111
{
3212
"include": "#special_block"

‎extensions/cpp/syntaxes/platform.tmLanguage.json‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/textmate/c.tmbundle/commit/9aa365882274ca52f01722f3dbb169b9539a20ee",
8-
"comment": "This file was generated with clang-C using MacOSX10.12.sdk",
9-
"fileTypes": [],
10-
"hideFromUser": true,
118
"name": "Platform",
9+
"scopeName": "source.c.platform",
10+
"comment": "This file was generated with clang-C using MacOSX10.12.sdk",
1211
"patterns": [
1312
{
1413
"match": "\\bkCF(?:CalendarUnitWeek|Gregorian(?:AllUnits|Units(?:Days|Hours|M(?:inutes|onths)|Seconds|Years)))\\b",
@@ -568,7 +567,5 @@
568567
}
569568
]
570569
}
571-
},
572-
"scopeName": "source.c.platform",
573-
"uuid": "3E3CB242-CEBA-4B61-9806-9A97B5783D2A"
570+
}
574571
}

‎extensions/csharp/syntaxes/csharp.tmLanguage.json‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/ca22c5211b87a6a1a8fd5356895237bb821df728",
88
"name": "C#",
99
"scopeName": "source.cs",
10-
"fileTypes": [
11-
"cs"
12-
],
13-
"uuid": "f7de61e2-bdde-4e2a-a139-8221b179584e",
1410
"patterns": [
1511
{
1612
"include": "#preprocessor"

‎extensions/css/syntaxes/css.tmLanguage.json‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/atom/language-css/commit/2bc1e294e2440ad91197263cd9f95dc4b00bab2f",
8-
"scopeName": "source.css",
98
"name": "CSS",
10-
"fileTypes": [
11-
"css",
12-
"css.erb"
13-
],
14-
"firstLineMatch": "(?xi)\n# Emacs modeline\n-\\*-(?:\\s*(?=[^:;\\s]+\\s*-\\*-)|(?:.*?[;\\s]|(?<=-\\*-))mode\\s*:\\s*)\n css\n(?=[\\s;]|(?<![-*])-\\*-).*?-\\*-\n|\n# Vim modeline\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 css\n(?=\\s|:|$)",
9+
"scopeName": "source.css",
1510
"patterns": [
1611
{
1712
"include": "#comment-block"

‎extensions/diff/syntaxes/diff.tmLanguage.json‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,8 @@
55
"Once accepted there, we are happy to receive an update request."
66
],
77
"version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7",
8-
"fileTypes": [
9-
"patch",
10-
"diff",
11-
"rej"
12-
],
13-
"firstLineMatch": "(?x)^\n\t\t(===\\ modified\\ file\n\t\t|==== \\s* // .+ \\s - \\s .+ \\s+ ====\n\t\t|Index:\\ \n\t\t|---\\ [^%\\n]\n\t\t|\\*\\*\\*.*\\d{4}\\s*$\n\t\t|\\d+(,\\d+)* (a|d|c) \\d+(,\\d+)* $\n\t\t|diff\\ --git\\ \n\t\t|commit\\ [0-9a-f]{40}$\n\t\t)",
14-
"keyEquivalent": "^~D",
158
"name": "Diff",
9+
"scopeName": "source.diff",
1610
"patterns": [
1711
{
1812
"captures": {
@@ -162,7 +156,5 @@
162156
"match": "^Only in .*: .*$\\n?",
163157
"name": "meta.diff.only-in"
164158
}
165-
],
166-
"scopeName": "source.diff",
167-
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184"
159+
]
168160
}

0 commit comments

Comments
 (0)