Debian Codegraph @

extensions/SyntaxHighlight_GeSHi/includes/SyntaxHighlightGeSHiCompat.php

raw symbols SCIP
1 <?php
2 /**
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation; either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License along
14 * with this program; if not, write to the Free Software Foundation, Inc.,
15 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 * http://www.gnu.org/copyleft/gpl.html
17 */
18
19 namespace MediaWiki\SyntaxHighlight;
20
21 class SyntaxHighlightGeSHiCompat {
22 /** @var array<string,string> A mapping of GeSHi lexer names to compatible Pygments lexers. */
23 private static $compatibleLexers = [
24 // Assembler
25 'arm' => 'asm',
26 '6502acme' => 'asm',
27 '6502tasm' => 'asm',
28 '6502kickass' => 'asm',
29 '68000devpac' => 'asm',
30 'dcpu16' => 'asm',
31 'm68k' => 'asm',
32 'mmix' => 'nasm',
33 'mpasm' => 'asm',
34 'pic16' => 'asm',
35 'z80' => 'asm',
36
37 // BASIC
38 'xbasic' => 'basic',
39 'thinbasic' => 'basic',
40 'sdlbasic' => 'basic',
41 'purebasic' => 'basic',
42 'mapbasic' => 'basic',
43 'locobasic' => 'basic',
44 'gwbasic' => 'basic',
45 'freebasic' => 'basic',
46 'basic4gl' => 'basic',
47 'zxbasic' => 'basic',
48 'gambas' => 'basic',
49 'oobas' => 'basic',
50 'bascomavr' => 'basic',
51
52 // C / C++
53 'c_loadrunner' => 'c',
54 'c_mac' => 'c',
55 'c_winapi' => 'c',
56 'upc' => 'c',
57 'cpp-qt' => 'cpp',
58 'cpp-winapi' => 'cpp',
59 'urbi' => 'cpp',
60
61 // HTML
62 'html4strict' => 'html',
63 'html5' => 'html',
64
65 // JavaScript
66 'jquery' => 'javascript',
67 'ecmascript' => 'javascript',
68
69 // Microsoft
70 'vb' => 'vbnet',
71 'asp' => 'aspx-vb',
72 'visualfoxpro' => 'foxpro',
73 'dos' => 'bat',
74 'visualprolog' => 'prolog',
75 'reg' => 'registry',
76
77 // Miscellaneous
78 'cadlisp' => 'lisp',
79 'java5' => 'java',
80 'php-brief' => 'php',
81 'povray' => 'pov',
82 'pys60' => 'python',
83 'rails' => 'ruby',
84 'rpmspec' => 'spec',
85 'rsplus' => 'splus',
86 'gettext' => 'pot',
87
88 // ML
89 'ocaml-brief' => 'ocaml',
90 'standardml' => 'sml',
91
92 // Modula 2
93 'modula3' => 'modula2',
94 'oberon2' => 'modula2',
95
96 // SQL
97 'dcl' => 'sql',
98 'plsql' => 'sql',
99 'oracle11' => 'sql',
100 'oracle8' => 'sql',
101
102 // REXX
103 'oorexx' => 'rexx',
104 'netrexx' => 'rexx',
105
106 // xpp is basically Java
107 'xpp' => 'java',
108
109 // apt
110 'apt_sources' => 'debsources',
111 ];
112
113 public static function getGeSHiToPygmentsMap(): array {
114 return self::$compatibleLexers;
115 }
116 }