mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Dissociate ECLiPSe from Prolog
ECLiPSe syntax is slightly different from Prolog syntax ECLiPSe is in the Prolog group so it will only be highlighted differently
This commit is contained in:
@@ -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,7 +2636,6 @@ Prolog:
|
|||||||
color: "#74283c"
|
color: "#74283c"
|
||||||
extensions:
|
extensions:
|
||||||
- .pl
|
- .pl
|
||||||
- .ecl
|
|
||||||
- .pro
|
- .pro
|
||||||
- .prolog
|
- .prolog
|
||||||
interpreters:
|
interpreters:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user