csharp.jsf.in (6982B)
1 # JOE syntax highlight file for C# 2 # Based on Java highlighter 3 4 =Idle 5 =Preproc yellow 6 =Comment green 7 =DocComment bold blue 8 =Constant cyan 9 =Escape bold cyan 10 =Type bold blue 11 =Keyword blue 12 =Operator blue 13 =Bad bold red 14 =Brace magenta 15 =Control 16 17 :begin Idle 18 * begin noeat call=.csharp() 19 20 .subr csharp 21 22 :reset Idle 23 * first noeat 24 " \t" reset 25 26 :first Idle 27 * idle noeat 28 "#" pre recolor=-1 29 30 :pre Preproc 31 * pre noeat 32 "a-zA-Z" preident recolor=-1 buffer 33 " \t" pre 34 "\n" reset 35 36 :preident Preproc 37 * preunknown strings 38 "if" prebody 39 "else" prebody 40 "elif" prebody 41 "endif" prebody 42 "region" preregion 43 "endregion" preregion 44 "define" predefine 45 "undef" predefine 46 "warning" preregion 47 "error" preregion 48 "line" prebody 49 done 50 "a-z" preident 51 52 :prebody Preproc 53 * prebody 54 "\n" reset 55 56 :preregion Preproc 57 * preregion_text 58 "\n" reset 59 60 :preregion_text Constant 61 * preregion_text 62 "\n" reset 63 64 :predefine Preproc 65 * predefine_text noeat 66 " \t" predefine 67 "\n" reset 68 69 :predefine_text Constant 70 * predefine_text 71 " \t" predefine_value 72 "\n" reset 73 74 :predefine_value Idle 75 * predefine_value 76 "\n" reset 77 78 :preunknown Preproc 79 * preunknown 80 "\n" reset 81 82 :idle Idle 83 * idle 84 "\n" reset 85 "/" slash 86 "0" first_digit recolor=-1 87 "1-9" decimal recolor=-1 88 "." maybe_float 89 "\"" string recolor=-1 90 "@" forcedliteral recolor=-1 91 "'" char recolor=-1 92 "\i" ident buffer 93 "{}" brace recolor=-1 94 ",:;=()><[]*&|!~+\-%^" control recolor=-1 95 96 :maybe_done Control 97 * idle noeat 98 "/" idle noeat return recolor=-2 99 100 :brace Brace 101 * idle noeat 102 103 :control Control 104 * idle noeat 105 106 :forcedliteral Idle 107 * idle noeat 108 "\i" ident recolor=-2 109 "\"" forcedstring recolor=-2 110 111 :forcedstring Constant 112 * forcedstring 113 "\"" forcedstringquot 114 115 :forcedstringquot Constant 116 * idle noeat 117 "\"" forcedstring # @"This -> "" <- is a literal quote" 118 119 :slash Idle 120 * idle noeat 121 "*" comment recolor=-2 122 "/" maybe_line_comment recolor=-2 123 124 :comment Comment 125 * comment 126 "*" maybe_end_comment 127 128 :maybe_end_comment Comment 129 * comment 130 "/" idle 131 "*" maybe_end_comment 132 133 :maybe_line_comment Comment 134 * line_comment noeat recolor=-1 135 "/" doc_comment recolor=-3 136 137 :line_comment Comment 138 * line_comment 139 "\n" reset 140 141 :doc_comment DocComment 142 * doc_comment 143 "\n" reset 144 145 :first_digit Constant 146 * idle noeat 147 "xX" hex 148 "." float 149 "eE" epart 150 "0-7" octal 151 "89" bad_number recolor=-1 152 153 :bad_number Bad 154 * idle noeat 155 "0-9" bad_number 156 157 :octal Constant 158 * idle noeat 159 "0-7" octal 160 "89" bad_number recolor=-1 161 162 :hex Constant 163 * idle noeat 164 "0-9A-Fa-f" hex 165 166 :decimal Constant 167 * idle noeat 168 "0-9" decimal 169 "eE" epart 170 "." float 171 172 :maybe_float Constant 173 * idle recolor=-2 noeat 174 "0-9" float recolor=-2 175 176 :float Constant 177 * idle noeat 178 "eE" epart 179 "0-9" float 180 181 :epart Constant 182 * idle noeat 183 "0-9+\-" enum 184 185 :enum Constant 186 * idle noeat 187 "0-9" enum 188 189 :string Constant 190 * string 191 "\"" idle 192 "\\" string_escape recolor=-1 193 "{" maybe_string_control recolor=-1 194 "}" maybe_control_end recolor=-1 195 196 :string_escape Escape 197 * string 198 "xu" string_hex_4 # Yes, \x has up to 4 numbers in C# 199 "U" string_hex_8 200 "0-7" string_octal2 201 "\n" string recolor=-2 202 203 # Eight all-purpose (hex/unicode short/unicode long) states for hexadecimal 204 # escape sequences 205 206 :string_hex_8 Escape 207 * string noeat 208 "0-9a-fA-F" string_hex_7 209 210 :string_hex_7 Escape 211 * string noeat 212 "0-9a-fA-F" string_hex_6 213 214 :string_hex_6 Escape 215 * string noeat 216 "0-9a-fA-F" string_hex_5 217 218 :string_hex_5 Escape 219 * string noeat 220 "0-9a-fA-F" string_hex_4 221 222 :string_hex_4 Escape 223 * string noeat 224 "0-9a-fA-F" string_hex_3 225 226 :string_hex_3 Escape 227 * string noeat 228 "0-9a-fA-F" string_hex_2 229 230 :string_hex_2 Escape 231 * string noeat 232 "0-9a-fA-F" string_hex_1 233 234 :string_hex_1 Escape 235 * string noeat 236 "0-9a-fA-F" string 237 238 :string_octal2 Escape 239 * string noeat 240 "0-7" string_octal3 241 242 :string_octal3 Escape 243 * string noeat 244 "0-7" string 245 246 :maybe_string_control Escape 247 * string noeat recolor=-2 248 "0-9" string_control 249 "{" string 250 251 :string_control Escape 252 * string_control 253 "\"" string noeat 254 "}" string 255 256 :maybe_control_end Escape 257 * string noeat recolor=-2 258 "}" string 259 260 :char Constant 261 * char 262 "\n" reset 263 "'" idle 264 "\\" char_escape recolor=-1 265 266 :char_escape Escape 267 * char 268 "xu" char_hex4 269 "U" char_hex8 270 "0-7" char_octal2 271 "\n" char recolor=-2 272 273 :char_hex8 Escape 274 * char noeat 275 "0-9a-fA-F" char_hex7 276 277 :char_hex7 Escape 278 * char noeat 279 "0-9a-fA-F" char_hex6 280 281 :char_hex6 Escape 282 * char noeat 283 "0-9a-fA-F" char_hex5 284 285 :char_hex5 Escape 286 * char noeat 287 "0-9a-fA-F" char_hex4 288 289 :char_hex4 Escape 290 * char noeat 291 "0-9a-fA-F" char_hex3 292 293 :char_hex3 Escape 294 * char noeat 295 "0-9a-fA-F" char_hex2 296 297 :char_hex2 Escape 298 * char noeat 299 "0-9a-fA-F" char_hex1 300 301 :char_hex1 Escape 302 * char noeat 303 "0-9a-fA-F" char 304 305 :char_octal2 Escape 306 * char noeat 307 "0-7" char_octal3 308 309 :char_octal3 Escape 310 * char noeat 311 "0-7" char 312 313 :ident Idle # http://msdn.microsoft.com/en-us/library/x53a06bb.aspx 314 * idle noeat strings 315 "abstract" kw 316 "as" operator 317 "base" kw 318 "break" kw 319 "case" kw 320 "catch" kw 321 "checked" operator 322 "class" kw 323 "const" kw 324 "continue" kw 325 "default" kw 326 "delegate" kw 327 "do" kw 328 "else" kw 329 "enum" kw 330 "event" kw 331 "explicit" kw 332 "extern" kw 333 "finally" kw 334 "fixed" kw 335 "for" kw 336 "foreach" kw 337 "goto" kw 338 "if" kw 339 "implicit" kw 340 "in" operator 341 "interface" kw 342 "internal" kw 343 "is" kw 344 "lock" kw 345 "nameof" kw 346 "namespace" kw 347 "new" operator 348 "operator" kw 349 "out" kw 350 "override" kw 351 "params" kw 352 "private" kw 353 "protected" kw 354 "public" kw 355 "readonly" kw 356 "ref" kw 357 "return" kw 358 "sealed" kw 359 "sizeof" operator 360 "stackalloc" kw 361 "static" kw 362 "struct" kw 363 "switch" kw 364 "this" kw 365 "throw" kw 366 "try" kw 367 "typeof" operator 368 "unchecked" operator 369 "unsafe" kw 370 "using" kw 371 "virtual" kw 372 "volatile" kw 373 "while" kw 374 375 # Types 376 377 "bool" type 378 "Boolean" type 379 "byte" type 380 "Byte" type 381 "char" type 382 "Character" type 383 "decimal" type 384 "double" type 385 "Double" type 386 "float" type 387 "Float" type 388 "int" type 389 "Integer" type 390 "int16" type 391 "Int16" type 392 "int32" type 393 "Int32" type 394 "int64" type 395 "Int64" type 396 "long" type 397 "object" type 398 "Object" type 399 "sbyte" type 400 "short" type 401 "string" type 402 "String" type 403 "uint" type 404 "uint16" type 405 "uint32" type 406 "uint64" type 407 "ulong" type 408 "ushort" type 409 "void" type 410 411 412 # These are "contextual" keywords. Should try to do a better and 413 # and find the context (most are LINQ), but it may not be possible 414 # in all cases: 415 416 "add" kw 417 "alias" kw 418 "ascending" kw 419 "async" kw 420 "await" kw 421 "descending" kw 422 "dynamic" type 423 "from" kw 424 "get" kw 425 "global" kw 426 "group" kw 427 "into" kw 428 "join" kw 429 "let" kw 430 "orderby" kw 431 "partial" kw 432 "remove" kw 433 "select" kw 434 "set" kw 435 "value" kw 436 "var" type 437 "where" kw 438 "yield" kw 439 440 # Literals 441 442 "true" lit 443 "false" lit 444 "null" lit 445 done 446 "\c" ident 447 448 :type Type 449 * idle noeat 450 451 :kw Keyword 452 * idle noeat 453 454 :lit Constant 455 * idle noeat 456 457 :operator Operator 458 * idle noeat 459 460 .end