ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HFile_csharp.php
Go to the documentation of this file.
1 <?php
2 
3 $BEAUT_PATH = realpath(".")."/Services/COPage/syntax_highlight/php";
4 if (!isset ($BEAUT_PATH)) return;
5 require_once("$BEAUT_PATH/Beautifier/HFile.php");
6  class HFile_csharp extends HFile{
7  function HFile_csharp(){
8  $this->HFile();
9 /*************************************/
10 // Beautifier Highlighting Configuration File
11 // C#
12 /*************************************/
13 // Flags
14 
15 $this->nocase = "0";
16 $this->notrim = "0";
17 $this->perl = "0";
18 
19 // Colours
20 
21 $this->colours = array("blue", "purple", "gray", "brown");
22 $this->quotecolour = "blue";
23 $this->blockcommentcolour = "green";
24 $this->linecommentcolour = "green";
25 
26 // Indent Strings
27 
28 $this->indent = array("{");
29 $this->unindent = array("}");
30 
31 // String characters and delimiters
32 
33 $this->stringchars = array("\"", "'");
34 $this->delimiters = array("~", "!", "@", "%", "^", "&", "*", "(", ")", "-", "+", "=", "|", "\\", "/", "{", "}", "[", "]", ":", ";", "\"", "'", "<", ">", " ", ",", " ", ".", "?");
35 $this->escchar = "";
36 
37 // Comment settings
38 
39 $this->linecommenton = array("//");
40 $this->blockcommenton = array("/*");
41 $this->blockcommentoff = array("*/");
42 
43 // Keywords (keyword mapping to colour number)
44 
45 $this->keywords = array(
46  "as" => "1",
47  "auto" => "1",
48  "base" => "1",
49  "break" => "1",
50  "case" => "1",
51  "catch" => "1",
52  "const" => "1",
53  "continue" => "1",
54  "default" => "1",
55  "do" => "1",
56  "else" => "1",
57  "event" => "1",
58  "explicit" => "1",
59  "extern" => "1",
60  "false" => "1",
61  "finally" => "1",
62  "fixed" => "1",
63  "for" => "1",
64  "foreach" => "1",
65  "goto" => "1",
66  "if" => "1",
67  "implicit" => "1",
68  "in" => "1",
69  "internal" => "1",
70  "lock" => "1",
71  "namespace" => "1",
72  "null" => "1",
73  "operator" => "1",
74  "out" => "1",
75  "override" => "1",
76  "params" => "1",
77  "private" => "1",
78  "protected" => "1",
79  "public" => "1",
80  "readonly" => "1",
81  "ref" => "1",
82  "return" => "1",
83  "sealed" => "1",
84  "stackalloc" => "1",
85  "static" => "1",
86  "switch" => "1",
87  "this" => "1",
88  "throw" => "1",
89  "true" => "1",
90  "try" => "1",
91  "unsafe" => "1",
92  "using" => "1",
93  "virtual" => "1",
94  "void" => "1",
95  "while" => "1",
96  "bool" => "2",
97  "byte" => "2",
98  "char" => "2",
99  "class" => "2",
100  "decimal" => "2",
101  "delegate" => "2",
102  "double" => "2",
103  "enum" => "2",
104  "float" => "2",
105  "int" => "2",
106  "interface" => "2",
107  "long" => "2",
108  "object" => "2",
109  "sbyte" => "2",
110  "short" => "2",
111  "string" => "2",
112  "struct" => "2",
113  "uint" => "2",
114  "ulong" => "2",
115  "ushort" => "2",
116  "#elif" => "3",
117  "#endif" => "3",
118  "#endregion" => "3",
119  "#else" => "3",
120  "#error" => "3",
121  "#define" => "3",
122  "#if" => "3",
123  "#line" => "3",
124  "#region" => "3",
125  "#undef" => "3",
126  "#warning" => "3",
127  "+" => "4",
128  "-" => "4",
129  "*" => "4",
130  "?" => "4",
131  "=" => "4",
132  "//" => "4",
133  "/" => "4",
134  "%" => "4",
135  "&" => "4",
136  ">" => "4",
137  "<" => "4",
138  "^" => "4",
139  "!" => "4",
140  "|" => "4",
141  ":" => "4",
142  "checked" => "4",
143  "is" => "4",
144  "new" => "4",
145  "sizeof" => "4",
146  "typeof" => "4",
147  "unchecked" => "4");
148 
149 // Special extensions
150 
151 
152 // Each category can specify a PHP function that returns an altered
153 // version of the keyword.
154 
155 
156 
157 
158 
159 $this->linkscripts = array(
160  "1" => "donothing",
161  "2" => "donothing",
162  "3" => "donothing",
163  "4" => "donothing");
164 }
165 
166 
167 
168 function donothing($keywordin)
169 {
170  return $keywordin;
171 }
172 
173 }
174 
175 ?>