More working tests.
[castle.git] / Experiments / AnakiaNet / Anakia / CodeFormat / CSharpFormat.cs
blob2a381a2669ca14b695bcb85637b20fe0a89d4126
1 #region Copyright © 2001-2003 Jean-Claude Manoli [jc@manoli.net]
2 /*
3 * This software is provided 'as-is', without any express or implied warranty.
4 * In no event will the author(s) be held liable for any damages arising from
5 * the use of this software.
6 *
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
11 * 1. The origin of this software must not be misrepresented; you must not
12 * claim that you wrote the original software. If you use this software
13 * in a product, an acknowledgment in the product documentation would be
14 * appreciated but is not required.
16 * 2. Altered source versions must be plainly marked as such, and must not
17 * be misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 */
21 #endregion
23 namespace Manoli.Utils.CSharpFormat
25 using System;
26 using System.IO;
27 using System.Text;
28 using System.Text.RegularExpressions;
30 /// <summary>
31 /// Generates color-coded HTML 4.01 from C# source code.
32 /// </summary>
33 public class CSharpFormat : CLikeFormat
35 /// <summary>
36 /// The list of C# keywords.
37 /// </summary>
38 protected override string Keywords
40 get
42 return "abstract as base bool break byte case catch char "
43 + "checked class const continue decimal default delegate do double else "
44 + "enum event explicit extern false finally fixed float for foreach goto "
45 + "if implicit in int interface internal is lock long namespace new null "
46 + "object operator out override partial params private protected public readonly "
47 + "ref return sbyte sealed short sizeof stackalloc static string struct "
48 + "switch this throw true try typeof uint ulong unchecked unsafe ushort "
49 + "using value virtual void volatile where while yield";
53 /// <summary>
54 /// The list of C# preprocessors.
55 /// </summary>
56 protected override string Preprocessors
58 get
60 return "#if #else #elif #endif #define #undef #warning "
61 + "#error #line #region #endregion #pragma";