Merge pull request #2089 from pchaigno/new-grammars

Grammar for 5 languages
This commit is contained in:
Adam Roben
2015-02-09 17:27:31 -05:00
9 changed files with 57 additions and 15 deletions

15
.gitmodules vendored
View File

@@ -597,6 +597,21 @@
[submodule "vendor/grammars/InnoSetup"]
path = vendor/grammars/InnoSetup
url = https://github.com/idleberg/InnoSetup-Sublime-Text
[submodule "vendor/grammars/gap-tmbundle"]
path = vendor/grammars/gap-tmbundle
url = https://github.com/dhowden/gap-tmbundle
[submodule "vendor/grammars/SublimePapyrus"]
path = vendor/grammars/SublimePapyrus
url = https://github.com/Kapiainen/SublimePapyrus
[submodule "vendor/grammars/sublime-spintools"]
path = vendor/grammars/sublime-spintools
url = https://github.com/bitbased/sublime-spintools
[submodule "vendor/grammars/PogoScript.tmbundle"]
path = vendor/grammars/PogoScript.tmbundle
url = https://github.com/featurist/PogoScript.tmbundle
[submodule "vendor/grammars/sublime-opal"]
path = vendor/grammars/sublime-opal
url = https://github.com/artifactz/sublime-opal
[submodule "vendor/grammars/mediawiki.tmbundle"]
path = vendor/grammars/mediawiki.tmbundle
url = https://github.com/textmate/mediawiki.tmbundle

View File

@@ -72,6 +72,8 @@ vendor/grammars/NimLime:
- source.nimcfg
vendor/grammars/PHP-Twig.tmbundle:
- text.html.twig
vendor/grammars/PogoScript.tmbundle/:
- source.pogoscript
vendor/grammars/RDoc.tmbundle:
- text.rdoc
vendor/grammars/Racket:
@@ -112,6 +114,10 @@ vendor/grammars/Sublime-VimL:
- source.viml
vendor/grammars/SublimeBrainfuck:
- source.bf
vendor/grammars/SublimePapyrus/:
- source.compiled-papyrus
- source.papyrus
- source.papyrus-assembly
vendor/grammars/SublimeXtend:
- source.xtend
vendor/grammars/TXL/:
@@ -225,6 +231,8 @@ vendor/grammars/fortran.tmbundle:
- source.fortran.modern
vendor/grammars/fsharpbinding:
- source.fsharp
vendor/grammars/gap-tmbundle/:
- source.gap
vendor/grammars/gettext.tmbundle:
- source.po
vendor/grammars/gnuplot-tmbundle:
@@ -455,12 +463,18 @@ vendor/grammars/sublime-nginx:
- source.nginx
vendor/grammars/sublime-nix:
- source.nix
vendor/grammars/sublime-opal/:
- source.opal
- source.opalsysdefs
vendor/grammars/sublime-robot-plugin:
- text.robot
vendor/grammars/sublime-rust:
- source.rust
vendor/grammars/sublime-sourcepawn:
- source.sp
vendor/grammars/sublime-spintools/:
- source.regexp.spin
- source.spin
vendor/grammars/sublime-tea:
- source.tea
vendor/grammars/sublime-text-ox/:

View File

@@ -961,7 +961,7 @@ GAP:
- .gd
- .gi
- .tst
tm_scope: none
tm_scope: source.gap
ace_mode: text
GAS:
@@ -2052,7 +2052,7 @@ Opal:
color: "#f7ede0"
extensions:
- .opal
tm_scope: none
tm_scope: source.opal
ace_mode: text
OpenCL:
@@ -2158,7 +2158,7 @@ Papyrus:
color: "#6600cc"
extensions:
- .psc
tm_scope: none
tm_scope: source.papyrus
ace_mode: text
Parrot:
@@ -2276,7 +2276,7 @@ PogoScript:
color: "#d80074"
extensions:
- .pogo
tm_scope: none
tm_scope: source.pogoscript
ace_mode: text
PostScript:
@@ -2323,7 +2323,7 @@ Propeller Spin:
color: "#2b446d"
extensions:
- .spin
tm_scope: none
tm_scope: source.spin
ace_mode: text
Protocol Buffer:

View File

@@ -3,12 +3,18 @@ require_relative "./helper"
class TestGrammars < Minitest::Test
ROOT = File.expand_path("../..", __FILE__)
# These grammars have no license but have been grandfathered in. New grammars
# must have a license that allows redistribution.
UNLICENSED_GRAMMARS_WHITELIST = %w[
vendor/grammars/Sublime-Lasso
vendor/grammars/Sublime-REBOL
vendor/grammars/x86-assembly-textmate-bundle
LICENSE_WHITELIST = [
# This grammar's MIT license is inside a subdirectory.
"vendor/grammars/SublimePapyrus",
# This grammar has a nonstandard but acceptable license.
"vendor/grammars/gap-tmbundle",
# These grammars have no license but have been grandfathered in. New grammars
# must have a license that allows redistribution.
"vendor/grammars/Sublime-Lasso",
"vendor/grammars/Sublime-REBOL",
"vendor/grammars/x86-assembly-textmate-bundle",
].freeze
def setup
@@ -77,9 +83,9 @@ class TestGrammars < Minitest::Test
unlicensed = categories[:unlicensed] || []
unrecognized = categories[:unrecognized] || []
disallowed_unlicensed = unlicensed - UNLICENSED_GRAMMARS_WHITELIST
disallowed_unrecognized = unrecognized - UNLICENSED_GRAMMARS_WHITELIST
extra_whitelist_entries = UNLICENSED_GRAMMARS_WHITELIST - (unlicensed | unrecognized)
disallowed_unlicensed = unlicensed - LICENSE_WHITELIST
disallowed_unrecognized = unrecognized - LICENSE_WHITELIST
extra_whitelist_entries = LICENSE_WHITELIST - (unlicensed | unrecognized)
message = ""
if disallowed_unlicensed.any?
@@ -93,7 +99,7 @@ class TestGrammars < Minitest::Test
end
if extra_whitelist_entries.any?
message << "\n\n" unless message.empty?
message << "The following grammar submodules are listed in UNLICENSED_GRAMMARS_WHITELIST but either have a license (yay!)\n"
message << "The following grammar submodules are listed in LICENSE_WHITELIST but either have a license (yay!)\n"
message << "or have been removed from the repository. Please remove them from the whitelist.\n"
message << extra_whitelist_entries.sort.join("\n")
end
@@ -131,6 +137,8 @@ class TestGrammars < Minitest::Test
"unlicense"
elsif content.include?("http://www.wtfpl.net/txt/copying/")
"WTFPL"
elsif content.include?("zlib") && content.include?("license") && content.include?("2. Altered source versions must be plainly marked as such")
"zlib"
end
end
end

1
vendor/grammars/gap-tmbundle vendored Submodule

1
vendor/grammars/sublime-opal vendored Submodule