Apply PSR-12 code style (#3886)
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / system / bbcode / highlighter / BashHighlighter.class.php
CommitLineData
dcc2332d 1<?php
a9229942 2
dcc2332d
MW
3namespace wcf\system\bbcode\highlighter;
4
5/**
6 * Highlights syntax of bash scripts.
a9229942
TD
7 *
8 * @author Tim Duesterhus
9 * @copyright 2001-2019 WoltLab GmbH
10 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
11 * @package WoltLabSuite\Core\System\Bbcode\Highlighter
12 * @deprecated since 5.2, use Prism to highlight your code.
dcc2332d 13 */
a9229942
TD
14class BashHighlighter extends Highlighter
15{
16 /**
17 * @inheritDoc
18 */
19 protected $separators = [';', '='];
20
21 /**
22 * @inheritDoc
23 */
24 protected $quotes = ['"', "'", '`'];
25
26 /**
27 * @inheritDoc
28 */
29 protected $singleLineComment = ['#'];
30
31 /**
32 * @inheritDoc
33 */
34 protected $commentStart = [];
35
36 /**
37 * @inheritDoc
38 */
39 protected $commentEnd = [];
40
41 /**
42 * @inheritDoc
43 */
44 protected $operators = [
45 '||',
46 '&&',
47 '&',
48 '|',
49 '<<=',
50 '>>=',
51 '<<',
52 '+=',
53 '-=',
54 '*=',
55 '/=',
56 '%=',
57 '-gt',
58 '-lt',
59 '-n',
60 '-a',
61 '-o',
62 '+',
63 '-',
64 '*',
65 '/',
66 '%',
67 '<',
68 '?',
69 ':',
70 '==',
71 '!=',
72 '=',
73 '!',
74 '>',
75 '2>',
76 '>>',
77 ];
78
79 /**
80 * @inheritDoc
81 */
82 protected $keywords1 = [
83 'true',
84 'false',
85 ];
86
87 /**
88 * @inheritDoc
89 */
90 protected $keywords2 = [
91 'if',
92 'then',
93 'else',
94 'fi',
95 'for',
96 'until',
97 'while',
98 'do',
99 'done',
100 'case',
101 'in',
102 'esac',
103 ];
104
105 /**
106 * @inheritDoc
107 */
108 protected $keywords3 = [
109 'echo',
110 'exit',
111 'unset',
112 'read',
113 '[',
114 ']',
115 'test',
116 'let',
117 'sed',
118 'grep',
119 'awk',
120 ];
121
122 /**
123 * @inheritDoc
124 */
125 protected $keywords4 = [
126 '$?',
127 ];
dcc2332d 128}