mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 14:43:05 -03:00
separated GetLanguageType and languagesType map in different files due to a better generation files
This commit is contained in:
@ -37,10 +37,10 @@ const (
|
||||
documentationTestTmplName = "documentation.go.tmpl"
|
||||
|
||||
// Types test
|
||||
typesTestFile = "test_files/type.test.yml"
|
||||
typesGold = "test_files/type.gold"
|
||||
typesTestTmplPath = "../assets/type.go.tmpl"
|
||||
typesTestTmplName = "type.go.tmpl"
|
||||
typesTestFile = "test_files/types.test.yml"
|
||||
typesGold = "test_files/types.gold"
|
||||
typesTestTmplPath = "../assets/types.go.tmpl"
|
||||
typesTestTmplName = "types.go.tmpl"
|
||||
|
||||
// Interpreters test
|
||||
interpretersTestFile = "test_files/interpreters.test.yml"
|
||||
|
@ -4,27 +4,6 @@ package slinguist
|
||||
// THIS FILE SHOULD NOT BE EDITED BY HAND
|
||||
// Extracted from github/linguist commit: fe8b44ab8a225b1ffa75b983b916ea22fee5b6f7
|
||||
|
||||
type Type int
|
||||
|
||||
const (
|
||||
// Language's type. Either data, programming, markup, prose, or unknown.
|
||||
Unknown Type = iota
|
||||
Data
|
||||
Programming
|
||||
Markup
|
||||
Prose
|
||||
)
|
||||
|
||||
// GetLanguageType returns the given language's type.
|
||||
func GetLanguageType(language string) (langType Type) {
|
||||
langType, ok := languagesType[language]
|
||||
if !ok {
|
||||
langType = Unknown
|
||||
}
|
||||
|
||||
return langType
|
||||
}
|
||||
|
||||
var languagesType = map[string]Type{
|
||||
"Scaml": Markup,
|
||||
"Scheme": Programming,
|
Reference in New Issue
Block a user