Merge pull request #2571 from pchaigno/prolog-grammar

New grammars for Prolog and ECLiPSe
This commit is contained in:
Arfon Smith
2015-08-19 21:44:13 +01:00
8 changed files with 20 additions and 11 deletions

6
.gitmodules vendored
View File

@@ -394,9 +394,6 @@
[submodule "vendor/grammars/processing.tmbundle"]
path = vendor/grammars/processing.tmbundle
url = https://github.com/textmate/processing.tmbundle
[submodule "vendor/grammars/prolog.tmbundle"]
path = vendor/grammars/prolog.tmbundle
url = https://github.com/textmate/prolog.tmbundle
[submodule "vendor/grammars/python-django.tmbundle"]
path = vendor/grammars/python-django.tmbundle
url = https://github.com/textmate/python-django.tmbundle
@@ -668,6 +665,9 @@
[submodule "vendor/grammars/st2-zonefile"]
path = vendor/grammars/st2-zonefile
url = https://github.com/sixty4k/st2-zonefile
[submodule "vendor/grammars/sublimeprolog"]
path = vendor/grammars/sublimeprolog
url = https://github.com/alnkpa/sublimeprolog
[submodule "vendor/grammars/sublime-aspectj"]
path = vendor/grammars/sublime-aspectj
url = https://github.com/pchaigno/sublime-aspectj

View File

@@ -432,8 +432,6 @@ vendor/grammars/powershell:
- source.powershell
vendor/grammars/processing.tmbundle:
- source.processing
vendor/grammars/prolog.tmbundle:
- source.prolog
vendor/grammars/protobuf-tmbundle:
- source.protobuf
vendor/grammars/puppet-textmate-bundle:
@@ -535,6 +533,9 @@ vendor/grammars/sublime_cobol:
vendor/grammars/sublime_man_page_support:
- source.man
- text.groff
vendor/grammars/sublimeprolog/:
- source.prolog
- source.prolog.eclipse
vendor/grammars/sublimetext-cuda-cpp:
- source.cuda-c++
vendor/grammars/swift.tmbundle:

View File

@@ -112,7 +112,7 @@ module Linguist
disambiguate ".ecl" do |data|
if /^[^#]+:-/.match(data)
Language["Prolog"]
Language["ECLiPSe"]
elsif data.include?(":=")
Language["ECL"]
end

View File

@@ -843,6 +843,14 @@ ECL:
tm_scope: none
ace_mode: text
ECLiPSe:
type: programming
group: prolog
extensions:
- .ecl
tm_scope: source.prolog.eclipse
ace_mode: prolog
Eagle:
type: markup
color: "#814C05"
@@ -2628,11 +2636,11 @@ Prolog:
color: "#74283c"
extensions:
- .pl
- .ecl
- .pro
- .prolog
interpreters:
- swipl
tm_scope: source.prolog
ace_mode: prolog
Propeller Spin:

View File

@@ -66,11 +66,11 @@ class TestHeuristcs < Minitest::Test
})
end
# Candidate languages = ["ECL", "Prolog"]
def test_ecl_prolog_by_heuristics
# Candidate languages = ["ECL", "ECLiPSe"]
def test_ecl_by_heuristics
assert_heuristics({
"ECL" => all_fixtures("ECL", "*.ecl"),
"Prolog" => all_fixtures("Prolog", "*.ecl")
"ECLiPSe" => all_fixtures("ECLiPSe", "*.ecl")
})
end