go-enry/content.go

569 lines
22 KiB
Go
Raw Normal View History

2017-06-13 13:56:07 +02:00
package enry
2016-07-13 19:05:09 +02:00
2017-06-08 09:27:27 +02:00
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
2017-04-05 16:01:31 +02:00
// THIS FILE SHOULD NOT BE EDITED BY HAND
2017-05-31 12:07:46 +02:00
// Extracted from github/linguist commit: b6460f8ed6b249281ada099ca28bd8f1230b8892
2017-04-05 16:01:31 +02:00
2016-07-13 19:05:09 +02:00
import (
2017-04-05 16:01:31 +02:00
"regexp"
2016-07-13 19:05:09 +02:00
)
2017-05-31 12:07:46 +02:00
type languageMatcher func([]byte) []string
2016-07-13 19:05:09 +02:00
2017-05-29 10:05:16 +02:00
var contentMatchers = map[string]languageMatcher{
2017-05-31 12:07:46 +02:00
".asc": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if asc_PublicKey_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Public Key"}
2017-04-05 16:01:31 +02:00
} else if asc_AsciiDoc_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"AsciiDoc"}
2017-04-05 16:01:31 +02:00
} else if asc_AGSScript_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"AGS Script"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".bb": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if bb_BlitzBasic_Matcher_0.Match(i) || bb_BlitzBasic_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"BlitzBasic"}
2017-04-05 16:01:31 +02:00
} else if bb_BitBake_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"BitBake"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".builds": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if builds_XML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"XML"}
2017-04-05 16:01:31 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Text"}
2017-04-05 16:01:31 +02:00
},
2017-05-31 12:07:46 +02:00
".ch": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if ch_xBase_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"xBase"}
2017-04-05 16:01:31 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2017-04-05 16:01:31 +02:00
},
2017-05-31 12:07:46 +02:00
".cl": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if cl_CommonLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Common Lisp"}
2017-04-05 16:01:31 +02:00
} else if cl_Cool_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Cool"}
2017-04-05 16:01:31 +02:00
} else if cl_OpenCL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"OpenCL"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".cls": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if cls_TeX_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"TeX"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".cs": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if cs_Smalltalk_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Smalltalk"}
2017-04-05 16:01:31 +02:00
} else if cs_CSharp_Matcher_0.Match(i) || cs_CSharp_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"C#"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".d": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if d_D_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"D"}
2017-04-05 16:01:31 +02:00
} else if d_DTrace_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"DTrace"}
2017-04-05 16:01:31 +02:00
} else if d_Makefile_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Makefile"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".ecl": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if ecl_ECLiPSe_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"ECLiPSe"}
2017-04-05 16:01:31 +02:00
} else if ecl_ECL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"ECL"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".es": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if es_Erlang_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Erlang"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".f": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if f_Forth_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Forth"}
2017-04-05 16:01:31 +02:00
} else if f_FilebenchWML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Filebench WML"}
} else if f_Fortran_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Fortran"}
2017-04-05 16:01:31 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2017-04-05 16:01:31 +02:00
},
2017-05-31 12:07:46 +02:00
".for": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if for_Forth_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Forth"}
} else if for_Fortran_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Fortran"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".fr": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if fr_Forth_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Forth"}
2017-04-05 16:01:31 +02:00
} else if fr_Frege_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Frege"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Text"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".fs": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if fs_Forth_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Forth"}
2017-04-05 16:01:31 +02:00
} else if fs_FSharp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"F#"}
2017-04-05 16:01:31 +02:00
} else if fs_GLSL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"GLSL"}
2017-04-05 16:01:31 +02:00
} else if fs_Filterscript_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Filterscript"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".gs": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if gs_Gosu_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Gosu"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".h": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if h_ObjectiveDashC_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Objective-C"}
2017-04-05 16:01:31 +02:00
} else if h_CPlusPlus_Matcher_0.Match(i) || h_CPlusPlus_Matcher_1.Match(i) || h_CPlusPlus_Matcher_2.Match(i) || h_CPlusPlus_Matcher_3.Match(i) || h_CPlusPlus_Matcher_4.Match(i) || h_CPlusPlus_Matcher_5.Match(i) || h_CPlusPlus_Matcher_6.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"C++"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".inc": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if inc_PHP_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"PHP"}
2017-04-05 16:01:31 +02:00
} else if inc_POVDashRaySDL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"POV-Ray SDL"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".l": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if l_CommonLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Common Lisp"}
2017-04-05 16:01:31 +02:00
} else if l_Lex_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Lex"}
} else if l_Roff_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Roff"}
2017-04-05 16:01:31 +02:00
} else if l_PicoLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"PicoLisp"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".ls": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if ls_LoomScript_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"LoomScript"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"LiveScript"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".lsp": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if lsp_CommonLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Common Lisp"}
2017-04-05 16:01:31 +02:00
} else if lsp_NewLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"NewLisp"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".lisp": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if lisp_CommonLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Common Lisp"}
2017-04-05 16:01:31 +02:00
} else if lisp_NewLisp_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"NewLisp"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".m": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if m_ObjectiveDashC_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Objective-C"}
2017-04-05 16:01:31 +02:00
} else if m_Mercury_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Mercury"}
2017-04-05 16:01:31 +02:00
} else if m_MUF_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"MUF"}
2017-04-05 16:01:31 +02:00
} else if m_M_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"M"}
2017-04-05 16:01:31 +02:00
} else if m_Mathematica_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Mathematica"}
2017-04-05 16:01:31 +02:00
} else if m_Matlab_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Matlab"}
2017-04-05 16:01:31 +02:00
} else if m_Limbo_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Limbo"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".md": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if md_Markdown_Matcher_0.Match(i) || md_Markdown_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Markdown"}
} else if md_GCCMachineDescription_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"GCC Machine Description"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Markdown"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".ml": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if ml_OCaml_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"OCaml"}
2017-04-05 16:01:31 +02:00
} else if ml_StandardML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Standard ML"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".mod": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if mod_XML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"XML"}
2017-04-05 16:01:31 +02:00
} else if mod_ModulaDash2_Matcher_0.Match(i) || mod_ModulaDash2_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Modula-2"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Linux Kernel Module", "AMPL"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".ms": func(i []byte) []string {
if ms_Roff_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Roff"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"MAXScript"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".n": func(i []byte) []string {
if n_Roff_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Roff"}
2017-04-05 16:01:31 +02:00
} else if n_Nemerle_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Nemerle"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".ncl": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if ncl_Text_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Text"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".nl": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if nl_NL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"NL"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"NewLisp"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".php": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if php_Hack_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Hack"}
2017-04-05 16:01:31 +02:00
} else if php_PHP_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"PHP"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".pl": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if pl_Prolog_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Prolog"}
2017-04-05 16:01:31 +02:00
} else if pl_Perl_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Perl"}
2017-04-05 16:01:31 +02:00
} else if pl_Perl6_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Perl6"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".pm": func(i []byte) []string {
if pm_Perl6_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Perl6"}
} else if pm_Perl_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Perl"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".pod": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if pod_Pod_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Pod"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Perl"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".pro": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if pro_Prolog_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Prolog"}
2017-04-05 16:01:31 +02:00
} else if pro_INI_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"INI"}
2017-04-05 16:01:31 +02:00
} else if pro_QMake_Matcher_0.Match(i) && pro_QMake_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"QMake"}
2017-04-05 16:01:31 +02:00
} else if pro_IDL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"IDL"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".props": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if props_XML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"XML"}
2017-04-05 16:01:31 +02:00
} else if props_INI_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"INI"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".r": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if r_Rebol_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Rebol"}
2017-04-05 16:01:31 +02:00
} else if r_R_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"R"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".rno": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if rno_RUNOFF_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"RUNOFF"}
} else if rno_Roff_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Roff"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".rpy": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if rpy_Python_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Python"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Ren'Py"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".rs": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if rs_Rust_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Rust"}
2017-04-05 16:01:31 +02:00
} else if rs_RenderScript_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"RenderScript"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".sc": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if sc_SuperCollider_Matcher_0.Match(i) || sc_SuperCollider_Matcher_1.Match(i) || sc_SuperCollider_Matcher_2.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"SuperCollider"}
2017-04-05 16:01:31 +02:00
} else if sc_Scala_Matcher_0.Match(i) || sc_Scala_Matcher_1.Match(i) || sc_Scala_Matcher_2.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Scala"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".sql": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if sql_PLpgSQL_Matcher_0.Match(i) || sql_PLpgSQL_Matcher_1.Match(i) || sql_PLpgSQL_Matcher_2.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"PLpgSQL"}
2017-04-05 16:01:31 +02:00
} else if sql_SQLPL_Matcher_0.Match(i) || sql_SQLPL_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"SQLPL"}
2017-04-05 16:01:31 +02:00
} else if sql_PLSQL_Matcher_0.Match(i) || sql_PLSQL_Matcher_1.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"PLSQL"}
2017-04-05 16:01:31 +02:00
} else if sql_SQL_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"SQL"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".srt": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if srt_SubRipText_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"SubRip Text"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".t": func(i []byte) []string {
if t_Turing_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Turing"}
} else if t_Perl6_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Perl6"}
} else if t_Perl_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"Perl"}
}
2017-05-31 12:07:46 +02:00
return nil
},
2017-05-31 12:07:46 +02:00
".toc": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if toc_WorldofWarcraftAddonData_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"World of Warcraft Addon Data"}
2017-04-05 16:01:31 +02:00
} else if toc_TeX_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"TeX"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return nil
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".ts": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if ts_XML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"XML"}
2016-07-16 22:41:51 +02:00
}
2017-04-05 16:01:31 +02:00
2017-05-31 12:07:46 +02:00
return []string{"TypeScript"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".tst": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if tst_GAP_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"GAP"}
2016-07-16 22:41:51 +02:00
}
2017-05-31 12:07:46 +02:00
return []string{"Scilab"}
2016-07-16 22:41:51 +02:00
},
2017-05-31 12:07:46 +02:00
".tsx": func(i []byte) []string {
2017-04-05 16:01:31 +02:00
if tsx_TypeScript_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"TypeScript"}
2017-04-05 16:01:31 +02:00
} else if tsx_XML_Matcher_0.Match(i) {
2017-05-31 12:07:46 +02:00
return []string{"XML"}
2017-04-05 16:01:31 +02:00
}
2016-07-16 22:41:51 +02:00
2017-05-31 12:07:46 +02:00
return nil
2017-04-05 16:01:31 +02:00
},
2016-07-13 19:05:09 +02:00
}
var (
2017-04-05 16:01:31 +02:00
asc_PublicKey_Matcher_0 = regexp.MustCompile(`(?m)^(----[- ]BEGIN|ssh-(rsa|dss)) `)
asc_AsciiDoc_Matcher_0 = regexp.MustCompile(`(?m)^[=-]+(\s|\n)|{{[A-Za-z]`)
asc_AGSScript_Matcher_0 = regexp.MustCompile(`(?m)^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`)
bb_BlitzBasic_Matcher_0 = regexp.MustCompile(`(?m)^\s*; `)
bb_BlitzBasic_Matcher_1 = regexp.MustCompile(`(?m)End Function`)
bb_BitBake_Matcher_0 = regexp.MustCompile(`(?m)^\s*(# |include|require)\b`)
builds_XML_Matcher_0 = regexp.MustCompile(`(?mi)^(\s*)(<Project|<Import|<Property|<?xml|xmlns)`)
ch_xBase_Matcher_0 = regexp.MustCompile(`(?mi)^\s*#\s*(if|ifdef|ifndef|define|command|xcommand|translate|xtranslate|include|pragma|undef)\b`)
cl_CommonLisp_Matcher_0 = regexp.MustCompile(`(?mi)^\s*\((defun|in-package|defpackage) `)
cl_Cool_Matcher_0 = regexp.MustCompile(`(?m)^class`)
cl_OpenCL_Matcher_0 = regexp.MustCompile(`(?m)\/\* |\/\/ |^\}`)
cls_TeX_Matcher_0 = regexp.MustCompile(`(?m)\\\w+{`)
cs_Smalltalk_Matcher_0 = regexp.MustCompile(`(?m)![\w\s]+methodsFor: `)
cs_CSharp_Matcher_0 = regexp.MustCompile(`(?m)^\s*namespace\s*[\w\.]+\s*{`)
cs_CSharp_Matcher_1 = regexp.MustCompile(`(?m)^\s*\/\/`)
d_D_Matcher_0 = regexp.MustCompile(`(?m)^module\s+[\w.]*\s*;|import\s+[\w\s,.:]*;|\w+\s+\w+\s*\(.*\)(?:\(.*\))?\s*{[^}]*}|unittest\s*(?:\(.*\))?\s*{[^}]*}`)
d_DTrace_Matcher_0 = regexp.MustCompile(`(?m)^(\w+:\w*:\w*:\w*|BEGIN|END|provider\s+|(tick|profile)-\w+\s+{[^}]*}|#pragma\s+D\s+(option|attributes|depends_on)\s|#pragma\s+ident\s)`)
d_Makefile_Matcher_0 = regexp.MustCompile(`(?m)([\/\\].*:\s+.*\s\\$|: \\$|^ : |^[\w\s\/\\.]+\w+\.\w+\s*:\s+[\w\s\/\\.]+\w+\.\w+)`)
ecl_ECLiPSe_Matcher_0 = regexp.MustCompile(`(?m)^[^#]+:-`)
ecl_ECL_Matcher_0 = regexp.MustCompile(`(?m):=`)
es_Erlang_Matcher_0 = regexp.MustCompile(`(?m)^\s*(?:%%|main\s*\(.*?\)\s*->)`)
f_Forth_Matcher_0 = regexp.MustCompile(`(?m)^: `)
f_FilebenchWML_Matcher_0 = regexp.MustCompile(`(?m)flowop`)
f_Fortran_Matcher_0 = regexp.MustCompile(`(?mi)^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`)
2017-04-05 16:01:31 +02:00
for_Forth_Matcher_0 = regexp.MustCompile(`(?m)^: `)
for_Fortran_Matcher_0 = regexp.MustCompile(`(?mi)^([c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`)
2017-04-05 16:01:31 +02:00
fr_Forth_Matcher_0 = regexp.MustCompile(`(?m)^(: |also |new-device|previous )`)
fr_Frege_Matcher_0 = regexp.MustCompile(`(?m)^\s*(import|module|package|data|type) `)
fs_Forth_Matcher_0 = regexp.MustCompile(`(?m)^(: |new-device)`)
fs_FSharp_Matcher_0 = regexp.MustCompile(`(?m)^\s*(#light|import|let|module|namespace|open|type)`)
fs_GLSL_Matcher_0 = regexp.MustCompile(`(?m)^\s*(#version|precision|uniform|varying|vec[234])`)
fs_Filterscript_Matcher_0 = regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`)
gs_Gosu_Matcher_0 = regexp.MustCompile(`(?m)^uses java\.`)
h_ObjectiveDashC_Matcher_0 = regexp.MustCompile(`(?m)^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])`)
h_CPlusPlus_Matcher_0 = regexp.MustCompile(`(?m)^\s*#\s*include <(cstdint|string|vector|map|list|array|bitset|queue|stack|forward_list|unordered_map|unordered_set|(i|o|io)stream)>`)
h_CPlusPlus_Matcher_1 = regexp.MustCompile(`(?m)^\s*template\s*<`)
h_CPlusPlus_Matcher_2 = regexp.MustCompile(`(?m)^[ \t]*try`)
h_CPlusPlus_Matcher_3 = regexp.MustCompile(`(?m)^[ \t]*catch\s*\(`)
h_CPlusPlus_Matcher_4 = regexp.MustCompile(`(?m)^[ \t]*(class|(using[ \t]+)?namespace)\s+\w+`)
h_CPlusPlus_Matcher_5 = regexp.MustCompile(`(?m)^[ \t]*(private|public|protected):$`)
h_CPlusPlus_Matcher_6 = regexp.MustCompile(`(?m)std::\w+`)
inc_PHP_Matcher_0 = regexp.MustCompile(`(?m)^<\?(?:php)?`)
inc_POVDashRaySDL_Matcher_0 = regexp.MustCompile(`(?m)^\s*#(declare|local|macro|while)\s`)
l_CommonLisp_Matcher_0 = regexp.MustCompile(`(?m)\(def(un|macro)\s`)
l_Lex_Matcher_0 = regexp.MustCompile(`(?m)^(%[%{}]xs|<.*>)`)
l_Roff_Matcher_0 = regexp.MustCompile(`(?mi)^\.[a-z][a-z](\s|$)`)
2017-04-05 16:01:31 +02:00
l_PicoLisp_Matcher_0 = regexp.MustCompile(`(?m)^\((de|class|rel|code|data|must)\s`)
ls_LoomScript_Matcher_0 = regexp.MustCompile(`(?m)^\s*package\s*[\w\.\/\*\s]*\s*{`)
lsp_CommonLisp_Matcher_0 = regexp.MustCompile(`(?mi)^\s*\((defun|in-package|defpackage) `)
lsp_NewLisp_Matcher_0 = regexp.MustCompile(`(?m)^\s*\(define `)
lisp_CommonLisp_Matcher_0 = regexp.MustCompile(`(?mi)^\s*\((defun|in-package|defpackage) `)
lisp_NewLisp_Matcher_0 = regexp.MustCompile(`(?m)^\s*\(define `)
m_ObjectiveDashC_Matcher_0 = regexp.MustCompile(`(?m)^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])`)
m_Mercury_Matcher_0 = regexp.MustCompile(`(?m):- module`)
m_MUF_Matcher_0 = regexp.MustCompile(`(?m)^: `)
m_M_Matcher_0 = regexp.MustCompile(`(?m)^\s*;`)
m_Mathematica_Matcher_0 = regexp.MustCompile(`(?m)\*\)$`)
m_Matlab_Matcher_0 = regexp.MustCompile(`(?m)^\s*%`)
m_Limbo_Matcher_0 = regexp.MustCompile(`(?m)^\w+\s*:\s*module\s*{`)
md_Markdown_Matcher_0 = regexp.MustCompile(`(?mi)(^[-a-z0-9=#!\*\[|>])|<\/`)
2017-06-13 13:56:07 +02:00
md_Markdown_Matcher_1 = regexp.MustCompile(`^$`)
md_GCCMachineDescription_Matcher_0 = regexp.MustCompile(`(?m)^(;;|\(define_)`)
2017-04-05 16:01:31 +02:00
ml_OCaml_Matcher_0 = regexp.MustCompile(`(?m)(^\s*module)|let rec |match\s+(\S+\s)+with`)
ml_StandardML_Matcher_0 = regexp.MustCompile(`(?m)=> |case\s+(\S+\s)+of`)
mod_XML_Matcher_0 = regexp.MustCompile(`(?m)<!ENTITY `)
mod_ModulaDash2_Matcher_0 = regexp.MustCompile(`(?mi)^\s*MODULE [\w\.]+;`)
mod_ModulaDash2_Matcher_1 = regexp.MustCompile(`(?mi)^\s*END [\w\.]+;`)
ms_Roff_Matcher_0 = regexp.MustCompile(`(?mi)^[.'][a-z][a-z](\s|$)`)
n_Roff_Matcher_0 = regexp.MustCompile(`(?m)^[.']`)
2017-04-05 16:01:31 +02:00
n_Nemerle_Matcher_0 = regexp.MustCompile(`(?m)^(module|namespace|using)\s`)
ncl_Text_Matcher_0 = regexp.MustCompile(`(?m)THE_TITLE`)
nl_NL_Matcher_0 = regexp.MustCompile(`(?m)^(b|g)[0-9]+ `)
php_Hack_Matcher_0 = regexp.MustCompile(`(?m)<\?hh`)
php_PHP_Matcher_0 = regexp.MustCompile(`(?m)<?[^h]`)
pl_Prolog_Matcher_0 = regexp.MustCompile(`(?m)^[^#]*:-`)
pl_Perl_Matcher_0 = regexp.MustCompile(`(?m)use strict|use\s+v?5\.`)
pl_Perl6_Matcher_0 = regexp.MustCompile(`(?m)^(use v6|(my )?class|module)`)
pm_Perl6_Matcher_0 = regexp.MustCompile(`(?m)^\s*(?:use\s+v6\s*;|(?:\bmy\s+)?class|module)\b`)
pm_Perl_Matcher_0 = regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`)
2017-04-05 16:01:31 +02:00
pod_Pod_Matcher_0 = regexp.MustCompile(`(?m)^=\w+\b`)
pro_Prolog_Matcher_0 = regexp.MustCompile(`(?m)^[^#]+:-`)
pro_INI_Matcher_0 = regexp.MustCompile(`(?m)last_client=`)
pro_QMake_Matcher_0 = regexp.MustCompile(`(?m)HEADERS`)
pro_QMake_Matcher_1 = regexp.MustCompile(`(?m)SOURCES`)
pro_IDL_Matcher_0 = regexp.MustCompile(`(?m)^\s*function[ \w,]+$`)
props_XML_Matcher_0 = regexp.MustCompile(`(?mi)^(\s*)(<Project|<Import|<Property|<?xml|xmlns)`)
props_INI_Matcher_0 = regexp.MustCompile(`(?mi)\w+\s*=\s*`)
r_Rebol_Matcher_0 = regexp.MustCompile(`(?mi)\bRebol\b`)
r_R_Matcher_0 = regexp.MustCompile(`(?m)<-|^\s*#`)
rno_RUNOFF_Matcher_0 = regexp.MustCompile(`(?mi)^\.!|^\.end lit(?:eral)?\b`)
rno_Roff_Matcher_0 = regexp.MustCompile(`(?m)^\.\\" `)
2017-04-05 16:01:31 +02:00
rpy_Python_Matcher_0 = regexp.MustCompile(`(?ms)(^(import|from|class|def)\s)`)
rs_Rust_Matcher_0 = regexp.MustCompile(`(?m)^(use |fn |mod |pub |macro_rules|impl|#!?\[)`)
rs_RenderScript_Matcher_0 = regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`)
sc_SuperCollider_Matcher_0 = regexp.MustCompile(`(?m)\^(this|super)\.`)
sc_SuperCollider_Matcher_1 = regexp.MustCompile(`(?m)^\s*(\+|\*)\s*\w+\s*{`)
sc_SuperCollider_Matcher_2 = regexp.MustCompile(`(?m)^\s*~\w+\s*=\.`)
sc_Scala_Matcher_0 = regexp.MustCompile(`(?m)^\s*import (scala|java)\.`)
sc_Scala_Matcher_1 = regexp.MustCompile(`(?m)^\s*val\s+\w+\s*=`)
sc_Scala_Matcher_2 = regexp.MustCompile(`(?m)^\s*class\b`)
sql_PLpgSQL_Matcher_0 = regexp.MustCompile(`(?mi)^\\i\b|AS \$\$|LANGUAGE '?plpgsql'?`)
sql_PLpgSQL_Matcher_1 = regexp.MustCompile(`(?mi)SECURITY (DEFINER|INVOKER)`)
sql_PLpgSQL_Matcher_2 = regexp.MustCompile(`(?mi)BEGIN( WORK| TRANSACTION)?;`)
sql_SQLPL_Matcher_0 = regexp.MustCompile(`(?mi)(alter module)|(language sql)|(begin( NOT)+ atomic)`)
sql_SQLPL_Matcher_1 = regexp.MustCompile(`(?mi)signal SQLSTATE '[0-9]+'`)
sql_PLSQL_Matcher_0 = regexp.MustCompile(`(?mi)\$\$PLSQL_|XMLTYPE|sysdate|systimestamp|\.nextval|connect by|AUTHID (DEFINER|CURRENT_USER)`)
sql_PLSQL_Matcher_1 = regexp.MustCompile(`(?mi)constructor\W+function`)
sql_SQL_Matcher_0 = regexp.MustCompile(`(?mi)! /begin|boolean|package|exception`)
srt_SubRipText_Matcher_0 = regexp.MustCompile(`(?m)^(\d{2}:\d{2}:\d{2},\d{3})\s*(-->)\s*(\d{2}:\d{2}:\d{2},\d{3})$`)
t_Turing_Matcher_0 = regexp.MustCompile(`(?m)^\s*%[ \t]+|^\s*var\s+\w+\s*:=\s*\w+`)
t_Perl6_Matcher_0 = regexp.MustCompile(`(?m)^\s*(?:use\s+v6\s*;|\bmodule\b|\b(?:my\s+)?class\b)`)
t_Perl_Matcher_0 = regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`)
2017-04-05 16:01:31 +02:00
toc_WorldofWarcraftAddonData_Matcher_0 = regexp.MustCompile(`(?m)^## |@no-lib-strip@`)
toc_TeX_Matcher_0 = regexp.MustCompile(`(?m)^\\(contentsline|defcounter|beamer|boolfalse)`)
ts_XML_Matcher_0 = regexp.MustCompile(`(?m)<TS`)
tst_GAP_Matcher_0 = regexp.MustCompile(`(?m)gap> `)
tsx_TypeScript_Matcher_0 = regexp.MustCompile(`(?m)^\s*(import.+(from\s+|require\()['"]react|\/\/\/\s*<reference\s)`)
tsx_XML_Matcher_0 = regexp.MustCompile(`(?mi)^\s*<\?xml\s+version`)
2016-07-14 18:12:12 +02:00
)