49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
# Mapping from human language names to common file extensions
|
|
LANGUAGE_EXTENSIONS = {
|
|
"Python": [".py", ".pyw"],
|
|
"C": [".c", ".h"],
|
|
"C++": [".cpp", ".cc", ".cxx", ".hpp", ".hh", ".inl"],
|
|
"Java": [".java"],
|
|
"JavaScript": [".js", ".mjs", ".cjs", ".jsx"],
|
|
"HTML": [".html", ".htm"],
|
|
"Shell": [".sh"],
|
|
"TypeScript": [".ts", ".tsx"],
|
|
"Go": [".go"],
|
|
"Rust": [".rs"],
|
|
}
|
|
|
|
# Additional common languages and extensions (expanded to match UCC-like list)
|
|
LANGUAGE_EXTENSIONS.update(
|
|
{
|
|
"Ada": [".adb", ".ads"],
|
|
"Assembly": [".s", ".asm"],
|
|
"Bash": [".sh", ".bash"],
|
|
"C#": [".cs"],
|
|
"C-Shell": [".csh"],
|
|
"CFScript": [".cfm", ".cfc"],
|
|
"COBOL": [".cob", ".cbl"],
|
|
"CSS": [".css"],
|
|
"ColdFusion": [".cfm", ".cfc"],
|
|
"DOS_Batch": [".bat", ".cmd"],
|
|
"Datafile": [".dat", ".data"],
|
|
"Fortran": [".f", ".for", ".f90", ".f95"],
|
|
"IDL": [".idl"],
|
|
"MATLAB": [".m"],
|
|
"Makefile": ["Makefile"],
|
|
"NeXtMidas": [".m"],
|
|
"X-Midas": [".xm", ".midas"],
|
|
"XML": [".xml"],
|
|
"OBJC": [".m", ".mm"],
|
|
"PHP": [".php", ".phtml"],
|
|
"Pascal": [".pas", ".pp"],
|
|
"Perl": [".pl", ".pm"],
|
|
"Ruby": [".rb"],
|
|
"SQL": [".sql"],
|
|
"Scala": [".scala"],
|
|
"VBScript": [".vbs"],
|
|
"VHDL": [".vhdl", ".vhd"],
|
|
"Verilog": [".v", ".sv"],
|
|
"Visual_Basic": [".vb"],
|
|
}
|
|
)
|