Skip to content

Commit

Permalink
update grammar script: remove unused properties
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Feb 12, 2018
1 parent 6b31642 commit 8fdf170
Show file tree
Hide file tree
Showing 54 changed files with 353 additions and 864 deletions.
10 changes: 6 additions & 4 deletions build/npm/update-grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function download(url, redirectCount) {
let location = response.headers['location'];
if (location) {
console.log("Redirected " + url + " to " + location);
download(location, count+1).then(c, e);
download(location, count + 1).then(c, e);
return;
}
}
Expand Down Expand Up @@ -86,7 +86,7 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
} else if (ext === '.json') {
grammar = JSON.parse(content);
} else {
return Promise.reject(new Error(('Unknown file extension: ' + ext)));
return Promise.reject(new Error('Unknown file extension: ' + ext));
}
if (modifyGrammar) {
modifyGrammar(grammar);
Expand All @@ -103,8 +103,10 @@ exports.update = function (repoId, repoPath, dest, modifyGrammar, version = 'mas
if (info) {
result.version = 'https://github.com/' + repoId + '/commit/' + info.commitSha;
}
for (let key in grammar) {
if (!result.hasOwnProperty(key)) {

let keys = ['name', 'scopeName', 'comment', 'injections', 'patterns', 'repository'];
for (let key of keys) {
if (grammar.hasOwnProperty(key)) {
result[key] = grammar[key];
}
}
Expand Down
6 changes: 1 addition & 5 deletions extensions/bat/syntaxes/batchfile.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/mmims/language-batchfile/commit/3dd105c31484e5975144478dac1aa91d8f51e528",
"scopeName": "source.batchfile",
"name": "Batch File",
"fileTypes": [
"bat",
"cmd"
],
"scopeName": "source.batchfile",
"patterns": [
{
"include": "#commands"
Expand Down
19 changes: 1 addition & 18 deletions extensions/clojure/syntaxes/clojure.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-clojure/commit/ecc790326bc8e14220e4d2d72a392a30876c3219",
"scopeName": "source.clojure",
"fileTypes": [
"boot",
"clj",
"clj.hl",
"cljc",
"cljs",
"cljs.hl",
"cljx",
"clojure",
"edn",
"org",
"joke",
"joker"
],
"foldingStartMarker": "\\(\\s*$",
"foldingStopMarker": "^\\s*\\)",
"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)",
"name": "Clojure",
"scopeName": "source.clojure",
"patterns": [
{
"include": "#comment"
Expand Down
10 changes: 1 addition & 9 deletions extensions/coffeescript/syntaxes/coffeescript.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-coffee-script/commit/a0da2a73ad817e2fc13c2ef8fcd2624017c39610",
"scopeName": "source.coffee",
"name": "CoffeeScript",
"fileTypes": [
"coffee",
"Cakefile",
"coffee.erb",
"cson",
"_coffee"
],
"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)",
"scopeName": "source.coffee",
"patterns": [
{
"match": "(new)\\s+(?:(?:(class)\\s+(\\w+(?:\\.\\w*)*)?)|(\\w+(?:\\.\\w*)*))",
Expand Down
8 changes: 1 addition & 7 deletions extensions/cpp/syntaxes/c.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-c/commit/9c0c5f202741a5647025db8d5df5fefba47b036c",
"scopeName": "source.c",
"fileTypes": [
"c",
"h.in",
"xpm"
],
"firstLineMatch": "(?i)-\\*-[^*]*(Mode:\\s*)?C(\\s*;.*?)?\\s*-\\*-",
"name": "C",
"scopeName": "source.c",
"patterns": [
{
"include": "#preprocessor-rule-enabled"
Expand Down
22 changes: 1 addition & 21 deletions extensions/cpp/syntaxes/cpp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-c/commit/3a269f88b12e512fb9495dc006a1dabf325d3d7f",
"scopeName": "source.cpp",
"fileTypes": [
"cc",
"cpp",
"cp",
"cxx",
"c++",
"cu",
"cuh",
"h",
"hh",
"hpp",
"hxx",
"h++",
"inl",
"ino",
"ipp",
"tcc",
"tpp"
],
"firstLineMatch": "(?i)-\\*-[^*]*(Mode:\\s*)?C\\+\\+(\\s*;.*?)?\\s*-\\*-",
"name": "C++",
"scopeName": "source.cpp",
"patterns": [
{
"include": "#special_block"
Expand Down
9 changes: 3 additions & 6 deletions extensions/cpp/syntaxes/platform.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/c.tmbundle/commit/9aa365882274ca52f01722f3dbb169b9539a20ee",
"comment": "This file was generated with clang-C using MacOSX10.12.sdk",
"fileTypes": [],
"hideFromUser": true,
"name": "Platform",
"scopeName": "source.c.platform",
"comment": "This file was generated with clang-C using MacOSX10.12.sdk",
"patterns": [
{
"match": "\\bkCF(?:CalendarUnitWeek|Gregorian(?:AllUnits|Units(?:Days|Hours|M(?:inutes|onths)|Seconds|Years)))\\b",
Expand Down Expand Up @@ -568,7 +567,5 @@
}
]
}
},
"scopeName": "source.c.platform",
"uuid": "3E3CB242-CEBA-4B61-9806-9A97B5783D2A"
}
}
4 changes: 0 additions & 4 deletions extensions/csharp/syntaxes/csharp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
"version": "https://github.com/dotnet/csharp-tmLanguage/commit/ca22c5211b87a6a1a8fd5356895237bb821df728",
"name": "C#",
"scopeName": "source.cs",
"fileTypes": [
"cs"
],
"uuid": "f7de61e2-bdde-4e2a-a139-8221b179584e",
"patterns": [
{
"include": "#preprocessor"
Expand Down
7 changes: 1 addition & 6 deletions extensions/css/syntaxes/css.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-css/commit/2bc1e294e2440ad91197263cd9f95dc4b00bab2f",
"scopeName": "source.css",
"name": "CSS",
"fileTypes": [
"css",
"css.erb"
],
"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|:|$)",
"scopeName": "source.css",
"patterns": [
{
"include": "#comment-block"
Expand Down
12 changes: 2 additions & 10 deletions extensions/diff/syntaxes/diff.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7",
"fileTypes": [
"patch",
"diff",
"rej"
],
"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)",
"keyEquivalent": "^~D",
"name": "Diff",
"scopeName": "source.diff",
"patterns": [
{
"captures": {
Expand Down Expand Up @@ -162,7 +156,5 @@
"match": "^Only in .*: .*$\\n?",
"name": "meta.diff.only-in"
}
],
"scopeName": "source.diff",
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184"
]
}
8 changes: 2 additions & 6 deletions extensions/docker/syntaxes/docker.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/moby/moby/commit/abd39744c6f3ed854500e423f5fabf952165161f",
"fileTypes": [
"Dockerfile"
],
"name": "Dockerfile",
"scopeName": "source.dockerfile",
"patterns": [
{
"captures": {
Expand Down Expand Up @@ -100,7 +98,5 @@
"comment": "comment.line",
"match": "^(\\s*)((#).*$\\n?)"
}
],
"scopeName": "source.dockerfile",
"uuid": "a39d8795-59d2-49af-aa00-fe74ee29576e"
]
}
5 changes: 0 additions & 5 deletions extensions/fsharp/syntaxes/fsharp.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
"version": "https://github.com/ionide/ionide-fsgrammar/commit/9aa4b1055e3173225bc0d4b4e48542c2450beb99",
"name": "fsharp",
"scopeName": "source.fsharp",
"fileTypes": [
"fs"
],
"foldingStartMarker": "",
"foldingStopMarker": "",
"patterns": [
{
"include": "#comments"
Expand Down
12 changes: 2 additions & 10 deletions extensions/gitsyntax/syntaxes/diff.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/diff.tmbundle/commit/0593bb775eab1824af97ef2172fd38822abd97d7",
"fileTypes": [
"patch",
"diff",
"rej"
],
"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)",
"keyEquivalent": "^~D",
"name": "Diff",
"scopeName": "source.diff",
"patterns": [
{
"captures": {
Expand Down Expand Up @@ -162,7 +156,5 @@
"match": "^Only in .*: .*$\\n?",
"name": "meta.diff.only-in"
}
],
"scopeName": "source.diff",
"uuid": "7E848FF4-708E-11D9-97B4-0011242E4184"
]
}
11 changes: 2 additions & 9 deletions extensions/gitsyntax/syntaxes/git-commit.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/git.tmbundle/commit/93897a78c6e52bef13dadc0d4091d203c5facb40",
"fileTypes": [
"COMMIT_EDITMSG",
"MERGE_MSG"
],
"foldingStartMarker": "^\\+\\+\\+",
"foldingStopMarker": "^---",
"name": "Git Commit Message",
"scopeName": "text.git-commit",
"patterns": [
{
"begin": "\\A(?!# Please enter the commit message)",
Expand Down Expand Up @@ -142,7 +137,5 @@
}
]
}
},
"scopeName": "text.git-commit",
"uuid": "BFE83C06-8508-44BE-A975-95A57BF619A7"
}
}
8 changes: 2 additions & 6 deletions extensions/gitsyntax/syntaxes/git-rebase.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/git.tmbundle/commit/d1db42c2d71948662098183a6df519fb53a7a15b",
"fileTypes": [
"git-rebase-todo"
],
"name": "Git Rebase Message",
"scopeName": "text.git-rebase",
"patterns": [
{
"captures": {
Expand All @@ -34,7 +32,5 @@
"match": "^\\s*(pick|p|reword|r|edit|e|squash|s|fixup|f|exec|x|drop|d)\\s+([0-9a-f]+)\\s+(.*)$",
"name": "meta.commit-command.git-rebase"
}
],
"scopeName": "text.git-rebase",
"uuid": "7F1CC209-5F6D-486A-8180-09FA282381A1"
]
}
7 changes: 1 addition & 6 deletions extensions/go/syntaxes/go.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/atom/language-go/commit/b6fd68f74efa109679e31fe6f4a41ac105262d0e",
"scopeName": "source.go",
"name": "Go",
"scopeName": "source.go",
"comment": "Go language",
"fileTypes": [
"go"
],
"foldingStartMarker": "({|\\()\\s*$",
"foldingStopMarker": "(}|\\))\\s*$",
"patterns": [
{
"include": "#comments"
Expand Down
12 changes: 2 additions & 10 deletions extensions/groovy/syntaxes/groovy.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,8 @@
"Once accepted there, we are happy to receive an update request."
],
"version": "https://github.com/textmate/groovy.tmbundle/commit/85d8f7c97ae473ccb9473f6c8d27e4ec957f4be1",
"fileTypes": [
"groovy",
"gvy"
],
"foldingStartMarker": "(\\{\\s*$|^\\s*// \\{\\{\\{)",
"foldingStopMarker": "^\\s*(\\}|// \\}\\}\\}$)",
"keyEquivalent": "^~G",
"name": "Groovy",
"scopeName": "source.groovy",
"patterns": [
{
"captures": {
Expand Down Expand Up @@ -1385,7 +1379,5 @@
}
]
}
},
"scopeName": "source.groovy",
"uuid": "B3A64888-EBBB-4436-8D9E-F1169C5D7613"
}
}
Loading

0 comments on commit 8fdf170

Please sign in to comment.