// Code generated by github.com/bzz/enry/v2/internal/code-generator DO NOT EDIT. // Extracted from github/linguist commit: 3a1bd3c3d3e741a8aaec4704f782e06f5cd2a00d package data import ( "regexp" "github.com/bzz/enry/v2/data/rule" ) var ContentHeuristics = map[string]*Heuristics{ ".1": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".1in": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".1m": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".1x": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".2": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3in": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3m": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3p": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3pm": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3qt": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".3x": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".4": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".5": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".6": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".7": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".8": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".9": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".as": &Heuristics{ rule.Or( rule.MatchingLanguages("ActionScript"), regexp.MustCompile(`(?m)^\s*(package\s+[a-z0-9_\.]+|import\s+[a-zA-Z0-9_\.]+;|class\s+[A-Za-z0-9_]+\s+extends\s+[A-Za-z0-9_]+)`), ), rule.Always( rule.MatchingLanguages("AngelScript"), ), }, ".asc": &Heuristics{ rule.Or( rule.MatchingLanguages("Public Key"), regexp.MustCompile(`(?m)^(----[- ]BEGIN|ssh-(rsa|dss)) `), ), rule.Or( rule.MatchingLanguages("AsciiDoc"), regexp.MustCompile(`(?m)^[=-]+(\s|\n)|{{[A-Za-z]`), ), rule.Or( rule.MatchingLanguages("AGS Script"), regexp.MustCompile(`(?m)^(\/\/.+|((import|export)\s+)?(function|int|float|char)\s+((room|repeatedly|on|game)_)?([A-Za-z]+[A-Za-z_0-9]+)\s*[;\(])`), ), }, ".asy": &Heuristics{ rule.Or( rule.MatchingLanguages("LTspice Symbol"), regexp.MustCompile(`(?m)^SymbolType[ \t]`), ), rule.Always( rule.MatchingLanguages("Asymptote"), ), }, ".bb": &Heuristics{ rule.Or( rule.MatchingLanguages("BlitzBasic"), regexp.MustCompile(`(?m)(<^\s*; |End Function)`), ), rule.Or( rule.MatchingLanguages("BitBake"), regexp.MustCompile(`(?m)^\s*(# |include|require)\b`), ), }, ".builds": &Heuristics{ rule.Or( rule.MatchingLanguages("XML"), regexp.MustCompile(`(?m)^(\s*)(?i:)`), ), }, ".f": &Heuristics{ rule.Or( rule.MatchingLanguages("Forth"), regexp.MustCompile(`(?m)^: `), ), rule.Or( rule.MatchingLanguages("Filebench WML"), regexp.MustCompile(`(?m)flowop`), ), rule.Or( rule.MatchingLanguages("Fortran"), regexp.MustCompile(`(?m)^(?i:[c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`), ), }, ".for": &Heuristics{ rule.Or( rule.MatchingLanguages("Forth"), regexp.MustCompile(`(?m)^: `), ), rule.Or( rule.MatchingLanguages("Fortran"), regexp.MustCompile(`(?m)^(?i:[c*][^abd-z]| (subroutine|program|end|data)\s|\s*!)`), ), }, ".fr": &Heuristics{ rule.Or( rule.MatchingLanguages("Forth"), regexp.MustCompile(`(?m)^(: |also |new-device|previous )`), ), rule.Or( rule.MatchingLanguages("Frege"), regexp.MustCompile(`(?m)^\s*(import|module|package|data|type) `), ), rule.Always( rule.MatchingLanguages("Text"), ), }, ".fs": &Heuristics{ rule.Or( rule.MatchingLanguages("Forth"), regexp.MustCompile(`(?m)^(: |new-device)`), ), rule.Or( rule.MatchingLanguages("F#"), regexp.MustCompile(`(?m)^\s*(#light|import|let|module|namespace|open|type)`), ), rule.Or( rule.MatchingLanguages("GLSL"), regexp.MustCompile(`(?m)^\s*(#version|precision|uniform|varying|vec[234])`), ), rule.Or( rule.MatchingLanguages("Filterscript"), regexp.MustCompile(`(?m)#include|#pragma\s+(rs|version)|__attribute__`), ), }, ".gd": &Heuristics{ rule.Or( rule.MatchingLanguages("GAP"), regexp.MustCompile(`(?m)\s*(Declare|BindGlobal|KeyDependentOperation)`), ), rule.Or( rule.MatchingLanguages("GDScript"), regexp.MustCompile(`(?m)\s*(extends|var|const|enum|func|class|signal|tool|yield|assert|onready)`), ), }, ".gml": &Heuristics{ rule.Or( rule.MatchingLanguages("XML"), regexp.MustCompile(`(?m)(?i:^\s*(\<\?xml|xmlns))`), ), rule.Or( rule.MatchingLanguages("Graph Modeling Language"), regexp.MustCompile(`(?m)(?i:^\s*(graph|node)\s+\[$)`), ), rule.Or( rule.MatchingLanguages("Gerber Image"), regexp.MustCompile(`(?m)\*\%$`), ), rule.Always( rule.MatchingLanguages("Game Maker Language"), ), }, ".gs": &Heuristics{ rule.Or( rule.MatchingLanguages("Gosu"), regexp.MustCompile(`(?m)^uses java\.`), ), }, ".h": &Heuristics{ rule.Or( rule.MatchingLanguages("Objective-C"), regexp.MustCompile(`(?m)^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])`), ), rule.Or( rule.MatchingLanguages("C++"), 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)>|^\s*template\s*<|^[ \t]*(try|constexpr)|^[ \t]*catch\s*\(|^[ \t]*(class|(using[ \t]+)?namespace)\s+\w+|^[ \t]*(private|public|protected):$|std::\w+`), ), }, ".hh": &Heuristics{ rule.Or( rule.MatchingLanguages("Hack"), regexp.MustCompile(`(?m)<\?hh`), ), }, ".ice": &Heuristics{ rule.Or( rule.MatchingLanguages("JSON"), regexp.MustCompile(`(?m)\A\s*[{\[]`), ), rule.Always( rule.MatchingLanguages("Slice"), ), }, ".inc": &Heuristics{ rule.Or( rule.MatchingLanguages("PHP"), regexp.MustCompile(`(?m)^<\?(?:php)?`), ), rule.Or( rule.MatchingLanguages("SourcePawn"), regexp.MustCompile(`(?m)^public\s+(?:SharedPlugin(?:\s+|:)__pl_\w+\s*=(?:\s*{)?|(?:void\s+)?__pl_\w+_SetNTVOptional\(\)(?:\s*{)?)`), ), rule.Or( rule.MatchingLanguages("POV-Ray SDL"), regexp.MustCompile(`(?m)^\s*#(declare|local|macro|while)\s`), ), }, ".l": &Heuristics{ rule.Or( rule.MatchingLanguages("Common Lisp"), regexp.MustCompile(`(?m)\(def(un|macro)\s`), ), rule.Or( rule.MatchingLanguages("Lex"), regexp.MustCompile(`(?m)^(%[%{}]xs|<.*>)`), ), rule.Or( rule.MatchingLanguages("Roff"), regexp.MustCompile(`(?m)^\.[A-Za-z]{2}(\s|$)`), ), rule.Or( rule.MatchingLanguages("PicoLisp"), regexp.MustCompile(`(?m)^\((de|class|rel|code|data|must)\s`), ), }, ".lisp": &Heuristics{ rule.Or( rule.MatchingLanguages("Common Lisp"), regexp.MustCompile(`(?m)^\s*\((?i:defun|in-package|defpackage) `), ), rule.Or( rule.MatchingLanguages("NewLisp"), regexp.MustCompile(`(?m)^\s*\(define `), ), }, ".ls": &Heuristics{ rule.Or( rule.MatchingLanguages("LoomScript"), regexp.MustCompile(`(?m)^\s*package\s*[\w\.\/\*\s]*\s*{`), ), rule.Always( rule.MatchingLanguages("LiveScript"), ), }, ".lsp": &Heuristics{ rule.Or( rule.MatchingLanguages("Common Lisp"), regexp.MustCompile(`(?m)^\s*\((?i:defun|in-package|defpackage) `), ), rule.Or( rule.MatchingLanguages("NewLisp"), regexp.MustCompile(`(?m)^\s*\(define `), ), }, ".m": &Heuristics{ rule.Or( rule.MatchingLanguages("Objective-C"), regexp.MustCompile(`(?m)^\s*(@(interface|class|protocol|property|end|synchronised|selector|implementation)\b|#import\s+.+\.h[">])`), ), rule.Or( rule.MatchingLanguages("Mercury"), regexp.MustCompile(`(?m):- module`), ), rule.Or( rule.MatchingLanguages("MUF"), regexp.MustCompile(`(?m)^: `), ), rule.Or( rule.MatchingLanguages("M"), regexp.MustCompile(`(?m)^\s*;`), ), rule.And( rule.MatchingLanguages("Mathematica"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)\(\*`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)\*\)$`), ), ), rule.Or( rule.MatchingLanguages("MATLAB"), regexp.MustCompile(`(?m)^\s*%`), ), rule.Or( rule.MatchingLanguages("Limbo"), regexp.MustCompile(`(?m)^\w+\s*:\s*module\s*{`), ), }, ".man": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".md": &Heuristics{ rule.Or( rule.MatchingLanguages("Markdown"), regexp.MustCompile(`(?m)(^[-A-Za-z0-9=#!\*\[|>])|<\/|\A\z`), ), rule.Or( rule.MatchingLanguages("GCC Machine Description"), regexp.MustCompile(`(?m)^(;;|\(define_)`), ), rule.Always( rule.MatchingLanguages("Markdown"), ), }, ".mdoc": &Heuristics{ rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dd +(?:[^"\s]+|"[^"]+")`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Dt +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*Sh +(?:[^"\s]|"[^"]+")`), ), ), rule.And( rule.MatchingLanguages("Roff Manpage"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*TH +(?:[^"\s]+|"[^"]+") +"?(?:[1-9]|@[^\s@]+@)`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[.'][ \t]*SH +(?:[^"\s]+|"[^"\s]+)`), ), ), rule.Always( rule.MatchingLanguages("Roff"), ), }, ".ml": &Heuristics{ rule.Or( rule.MatchingLanguages("OCaml"), regexp.MustCompile(`(?m)(^\s*module)|let rec |match\s+(\S+\s)+with`), ), rule.Or( rule.MatchingLanguages("Standard ML"), regexp.MustCompile(`(?m)=> |case\s+(\S+\s)+of`), ), }, ".mod": &Heuristics{ rule.Or( rule.MatchingLanguages("XML"), regexp.MustCompile(`(?m)\s`), ), }, ".pro": &Heuristics{ rule.Or( rule.MatchingLanguages("Prolog"), regexp.MustCompile(`(?m)^[^\[#]+:-`), ), rule.Or( rule.MatchingLanguages("INI"), regexp.MustCompile(`(?m)last_client=`), ), rule.And( rule.MatchingLanguages("QMake"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)HEADERS`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)SOURCES`), ), ), rule.Or( rule.MatchingLanguages("IDL"), regexp.MustCompile(`(?m)^\s*function[ \w,]+$`), ), }, ".properties": &Heuristics{ rule.And( rule.MatchingLanguages("INI"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[^#!;][^=]*=`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[;\[]`), ), ), rule.And( rule.MatchingLanguages("Java Properties"), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[^#!;][^=]*=`), ), rule.Or( rule.MatchingLanguages(""), regexp.MustCompile(`(?m)^[#!]`), ), ), rule.Or( rule.MatchingLanguages("INI"), regexp.MustCompile(`(?m)^[^#!;][^=]*=`), ), rule.Or( rule.MatchingLanguages("Java properties"), regexp.MustCompile(`(?m)^[^#!][^:]*:`), ), }, ".props": &Heuristics{ rule.Or( rule.MatchingLanguages("XML"), regexp.MustCompile(`(?m)^(\s*)(?i:)\s*(\d{2}:\d{2}:\d{2},\d{3})$`), ), }, ".t": &Heuristics{ rule.Or( rule.MatchingLanguages("Perl"), regexp.MustCompile(`(?m)\buse\s+(?:strict\b|v?5\.)`), ), rule.Or( rule.MatchingLanguages("Perl 6"), regexp.MustCompile(`(?m)^\s*(?:use\s+v6\b|\bmodule\b|\b(?:my\s+)?class\b)`), ), rule.Or( rule.MatchingLanguages("Turing"), regexp.MustCompile(`(?m)^\s*%[ \t]+|^\s*var\s+\w+(\s*:\s*\w+)?\s*:=\s*\w+`), ), }, ".toc": &Heuristics{ rule.Or( rule.MatchingLanguages("World of Warcraft Addon Data"), regexp.MustCompile(`(?m)^## |@no-lib-strip@`), ), rule.Or( rule.MatchingLanguages("TeX"), regexp.MustCompile(`(?m)^\\(contentsline|defcounter|beamer|boolfalse)`), ), }, ".ts": &Heuristics{ rule.Or( rule.MatchingLanguages("XML"), regexp.MustCompile(`(?m) `), ), rule.Always( rule.MatchingLanguages("Scilab"), ), }, ".tsx": &Heuristics{ rule.Or( rule.MatchingLanguages("TSX"), regexp.MustCompile(`(?m)^\s*(import.+(from\s+|require\()['"]react|\/\/\/\s*