mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #2571 from pchaigno/prolog-grammar
New grammars for Prolog and ECLiPSe
This commit is contained in:
6
.gitmodules
vendored
6
.gitmodules
vendored
@@ -394,9 +394,6 @@
|
|||||||
[submodule "vendor/grammars/processing.tmbundle"]
|
[submodule "vendor/grammars/processing.tmbundle"]
|
||||||
path = vendor/grammars/processing.tmbundle
|
path = vendor/grammars/processing.tmbundle
|
||||||
url = https://github.com/textmate/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"]
|
[submodule "vendor/grammars/python-django.tmbundle"]
|
||||||
path = vendor/grammars/python-django.tmbundle
|
path = vendor/grammars/python-django.tmbundle
|
||||||
url = https://github.com/textmate/python-django.tmbundle
|
url = https://github.com/textmate/python-django.tmbundle
|
||||||
@@ -668,6 +665,9 @@
|
|||||||
[submodule "vendor/grammars/st2-zonefile"]
|
[submodule "vendor/grammars/st2-zonefile"]
|
||||||
path = vendor/grammars/st2-zonefile
|
path = vendor/grammars/st2-zonefile
|
||||||
url = https://github.com/sixty4k/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"]
|
[submodule "vendor/grammars/sublime-aspectj"]
|
||||||
path = vendor/grammars/sublime-aspectj
|
path = vendor/grammars/sublime-aspectj
|
||||||
url = https://github.com/pchaigno/sublime-aspectj
|
url = https://github.com/pchaigno/sublime-aspectj
|
||||||
|
|||||||
@@ -432,8 +432,6 @@ vendor/grammars/powershell:
|
|||||||
- source.powershell
|
- source.powershell
|
||||||
vendor/grammars/processing.tmbundle:
|
vendor/grammars/processing.tmbundle:
|
||||||
- source.processing
|
- source.processing
|
||||||
vendor/grammars/prolog.tmbundle:
|
|
||||||
- source.prolog
|
|
||||||
vendor/grammars/protobuf-tmbundle:
|
vendor/grammars/protobuf-tmbundle:
|
||||||
- source.protobuf
|
- source.protobuf
|
||||||
vendor/grammars/puppet-textmate-bundle:
|
vendor/grammars/puppet-textmate-bundle:
|
||||||
@@ -535,6 +533,9 @@ vendor/grammars/sublime_cobol:
|
|||||||
vendor/grammars/sublime_man_page_support:
|
vendor/grammars/sublime_man_page_support:
|
||||||
- source.man
|
- source.man
|
||||||
- text.groff
|
- text.groff
|
||||||
|
vendor/grammars/sublimeprolog/:
|
||||||
|
- source.prolog
|
||||||
|
- source.prolog.eclipse
|
||||||
vendor/grammars/sublimetext-cuda-cpp:
|
vendor/grammars/sublimetext-cuda-cpp:
|
||||||
- source.cuda-c++
|
- source.cuda-c++
|
||||||
vendor/grammars/swift.tmbundle:
|
vendor/grammars/swift.tmbundle:
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ module Linguist
|
|||||||
|
|
||||||
disambiguate ".ecl" do |data|
|
disambiguate ".ecl" do |data|
|
||||||
if /^[^#]+:-/.match(data)
|
if /^[^#]+:-/.match(data)
|
||||||
Language["Prolog"]
|
Language["ECLiPSe"]
|
||||||
elsif data.include?(":=")
|
elsif data.include?(":=")
|
||||||
Language["ECL"]
|
Language["ECL"]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -843,6 +843,14 @@ ECL:
|
|||||||
tm_scope: none
|
tm_scope: none
|
||||||
ace_mode: text
|
ace_mode: text
|
||||||
|
|
||||||
|
ECLiPSe:
|
||||||
|
type: programming
|
||||||
|
group: prolog
|
||||||
|
extensions:
|
||||||
|
- .ecl
|
||||||
|
tm_scope: source.prolog.eclipse
|
||||||
|
ace_mode: prolog
|
||||||
|
|
||||||
Eagle:
|
Eagle:
|
||||||
type: markup
|
type: markup
|
||||||
color: "#814C05"
|
color: "#814C05"
|
||||||
@@ -2628,11 +2636,11 @@ Prolog:
|
|||||||
color: "#74283c"
|
color: "#74283c"
|
||||||
extensions:
|
extensions:
|
||||||
- .pl
|
- .pl
|
||||||
- .ecl
|
|
||||||
- .pro
|
- .pro
|
||||||
- .prolog
|
- .prolog
|
||||||
interpreters:
|
interpreters:
|
||||||
- swipl
|
- swipl
|
||||||
|
tm_scope: source.prolog
|
||||||
ace_mode: prolog
|
ace_mode: prolog
|
||||||
|
|
||||||
Propeller Spin:
|
Propeller Spin:
|
||||||
|
|||||||
@@ -66,11 +66,11 @@ class TestHeuristcs < Minitest::Test
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
# Candidate languages = ["ECL", "Prolog"]
|
# Candidate languages = ["ECL", "ECLiPSe"]
|
||||||
def test_ecl_prolog_by_heuristics
|
def test_ecl_by_heuristics
|
||||||
assert_heuristics({
|
assert_heuristics({
|
||||||
"ECL" => all_fixtures("ECL", "*.ecl"),
|
"ECL" => all_fixtures("ECL", "*.ecl"),
|
||||||
"Prolog" => all_fixtures("Prolog", "*.ecl")
|
"ECLiPSe" => all_fixtures("ECLiPSe", "*.ecl")
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
1
vendor/grammars/prolog.tmbundle
vendored
1
vendor/grammars/prolog.tmbundle
vendored
Submodule vendor/grammars/prolog.tmbundle deleted from d955aca38b
1
vendor/grammars/sublimeprolog
vendored
Submodule
1
vendor/grammars/sublimeprolog
vendored
Submodule
Submodule vendor/grammars/sublimeprolog added at 9fd46df4b6
Reference in New Issue
Block a user