]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - extensions/SyntaxHighlight_GeSHi/SyntaxHighlight.GeSHi.compat.php
MediaWiki 1.30.2-scripts
[autoinstalls/mediawiki.git] / extensions / SyntaxHighlight_GeSHi / SyntaxHighlight.GeSHi.compat.php
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 class SyntaxHighlightGeSHiCompat {
19         /** @var array A mapping of GeSHi lexer names to compatible Pygments lexers. */
20         private static $compatibleLexers = [
21                 // Assembler
22                 'arm'       => 'asm',
23                 '6502acme'  => 'asm',
24                 '6502tasm'  => 'asm',
25                 '6502kickass' => 'asm',
26                 '68000devpac' => 'asm',
27                 'dcpu16'    => 'asm',
28                 'm68k'      => 'asm',
29                 'mmix'      => 'nasm',
30                 'mpasm'     => 'asm',
31                 'pic16'     => 'asm',
32                 'z80'       => 'asm',
33
34                 // BASIC
35                 'xbasic'    => 'basic',
36                 'thinbasic' => 'basic',
37                 'sdlbasic'  => 'basic',
38                 'purebasic' => 'basic',
39                 'mapbasic'  => 'basic',
40                 'locobasic' => 'basic',
41                 'gwbasic'   => 'basic',
42                 'freebasic' => 'basic',
43                 'basic4gl'  => 'basic',
44                 'zxbasic'   => 'basic',
45                 'gambas'    => 'basic',
46                 'oobas'     => 'basic',
47                 'bascomavr' => 'basic',
48
49                 // C / C++
50                 'c_loadrunner' => 'c',
51                 'c_mac'        => 'c',
52                 'c_winapi'     => 'c',
53                 'upc'          => 'c',
54                 'cpp-qt'       => 'cpp',
55                 'cpp-winapi'   => 'cpp',
56                 'urbi'         => 'cpp',
57
58                 // HTML
59                 'html4strict' => 'html',
60                 'html5'       => 'html',
61
62                 // JavaScript
63                 'jquery'     => 'javascript',
64                 'ecmascript' => 'javascript',
65
66                 // Microsoft
67                 'vb'           => 'vbnet',
68                 'asp'          => 'aspx-vb',
69                 'visualfoxpro' => 'foxpro',
70                 'dos'          => 'bat',
71                 'visualprolog' => 'prolog',
72                 'reg'          => 'registry',
73
74                 // Miscellaneous
75                 'cadlisp'   => 'lisp',
76                 'java5'     => 'java',
77                 'php-brief' => 'php',
78                 'povray'    => 'pov',
79                 'pys60'     => 'python',
80                 'rails'     => 'ruby',
81                 'rpmspec'   => 'spec',
82                 'rsplus'    => 'splus',
83                 'gettext'   => 'pot',
84
85                 // ML
86                 'ocaml-brief' => 'ocaml',
87                 'standardml'  => 'sml',
88
89                 // Modula 2
90                 'modula3' => 'modula2',
91                 'oberon2' => 'modula2',
92
93                 // SQL
94                 'dcl'      => 'sql',
95                 'plsql'    => 'sql',
96                 'oracle11' => 'sql',
97                 'oracle8'  => 'sql',
98
99                 // REXX
100                 'oorexx'  => 'rexx',
101                 'netrexx' => 'rexx',
102
103                 // xpp is basically Java
104                 'xpp' => 'java',
105
106                 // apt
107                 'apt_sources' => 'debsources',
108         ];
109
110         public static function getGeSHiToPygmentsMap() {
111                 return self::$compatibleLexers;
112         }
113 }