tartrazine/internal/code-generator/generator/test_files/content.gold

143 lines
5.7 KiB
Plaintext
Raw Normal View History

2017-06-13 11:56:07 +00:00
package enry
2017-04-05 14:01:31 +00:00
2017-06-08 07:27:27 +00:00
// CODE GENERATED AUTOMATICALLY WITH gopkg.in/src-d/enry.v1/internal/code-generator
2017-04-05 14:01:31 +00:00
// THIS FILE SHOULD NOT BE EDITED BY HAND
2017-05-29 08:05:16 +00:00
// Extracted from github/linguist commit: 0123456789abcdef0123456789abcdef01234567
2017-04-05 14:01:31 +00:00
import (
"regexp"
)
2017-05-31 10:07:46 +00:00
type languageMatcher func([]byte) []string
2017-04-05 14:01:31 +00:00
2017-05-29 08:05:16 +00:00
var contentMatchers = map[string]languageMatcher{
2017-05-31 10:07:46 +00:00
".asc": func(i []byte) []string {
2017-04-05 14:01:31 +00:00
if asc_PublicKey_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Public Key"}
2017-04-05 14:01:31 +00:00
} else if asc_AsciiDoc_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"AsciiDoc"}
2017-04-05 14:01:31 +00:00
} else if asc_AGSScript_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"AGS Script"}
2017-04-05 14:01:31 +00:00
}
2017-05-31 10:07:46 +00:00
return nil
2017-04-05 14:01:31 +00:00
},
2017-05-31 10:07:46 +00:00
".f": func(i []byte) []string {
if f_Forth_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Forth"}
} else if f_FilebenchWML_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Filebench WML"}
} else if f_FORTRAN_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"FORTRAN"}
}
2017-05-31 10:07:46 +00:00
return nil
},
2017-05-31 10:07:46 +00:00
".h": func(i []byte) []string {
if h_ObjectiveDashC_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Objective-C"}
} 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 10:07:46 +00:00
return []string{"C++"}
}
2017-05-31 10:07:46 +00:00
return nil
},
2017-05-31 10:07:46 +00:00
".lsp": func(i []byte) []string {
if lsp_CommonLisp_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Common Lisp"}
} else if lsp_NewLisp_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"NewLisp"}
}
2017-05-31 10:07:46 +00:00
return nil
},
2017-05-31 10:07:46 +00:00
".lisp": func(i []byte) []string {
if lisp_CommonLisp_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Common Lisp"}
} else if lisp_NewLisp_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"NewLisp"}
}
2017-05-31 10:07:46 +00:00
return nil
},
2017-05-31 10:07:46 +00:00
".md": func(i []byte) []string {
if md_Markdown_Matcher_0.Match(i) || md_Markdown_Matcher_1.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Markdown"}
} else if md_GCCmachinedescription_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"GCC machine description"}
}
2017-05-31 10:07:46 +00:00
return []string{"Markdown"}
},
2017-05-31 10:07:46 +00:00
".ms": func(i []byte) []string {
2017-04-05 14:01:31 +00:00
if ms_Groff_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Groff"}
2017-04-05 14:01:31 +00:00
}
2017-05-31 10:07:46 +00:00
return []string{"MAXScript"}
2017-04-05 14:01:31 +00:00
},
2017-05-31 10:07:46 +00:00
".mod": func(i []byte) []string {
2017-04-05 14:01:31 +00:00
if mod_XML_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"XML"}
2017-04-05 14:01:31 +00:00
} else if mod_ModulaDash2_Matcher_0.Match(i) || mod_ModulaDash2_Matcher_1.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Modula-2"}
2017-04-05 14:01:31 +00:00
}
2017-05-31 10:07:46 +00:00
return []string{"Linux Kernel Module", "AMPL"}
2017-04-05 14:01:31 +00:00
},
2017-05-31 10:07:46 +00:00
".pro": func(i []byte) []string {
2017-04-05 14:01:31 +00:00
if pro_Prolog_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Prolog"}
2017-04-05 14:01:31 +00:00
} else if pro_INI_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"INI"}
2017-04-05 14:01:31 +00:00
} else if pro_QMake_Matcher_0.Match(i) && pro_QMake_Matcher_1.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"QMake"}
2017-04-05 14:01:31 +00:00
} else if pro_IDL_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"IDL"}
2017-04-05 14:01:31 +00:00
}
2017-05-31 10:07:46 +00:00
return nil
2017-04-05 14:01:31 +00:00
},
2017-05-31 10:07:46 +00:00
".rpy": func(i []byte) []string {
if rpy_Python_Matcher_0.Match(i) {
2017-05-31 10:07:46 +00:00
return []string{"Python"}
}
2017-05-31 10:07:46 +00:00
return []string{"Ren'Py"}
},
}
2017-04-05 14:01:31 +00:00
var (
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*[;\(])`)
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*!)`)
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+`)
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 `)
md_Markdown_Matcher_0 = regexp.MustCompile(`(?mi)(^[-a-z0-9=#!\*\[|>])|<\/`)
md_Markdown_Matcher_1 = regexp.MustCompile(`(?m)^$`)
md_GCCmachinedescription_Matcher_0 = regexp.MustCompile(`(?m)^(;;|\(define_)`)
ms_Groff_Matcher_0 = regexp.MustCompile(`(?mi)^[.'][a-z][a-z](\s|$)`)
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\.]+;`)
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,]+$`)
rpy_Python_Matcher_0 = regexp.MustCompile(`(?ms)(^(import|from|class|def)\s)`)
)