/** * Name: csharp * Description: C# programming language. * Author: Christian Romney */ state csharp extends HighlightEntry { /* Comments. */ /\/\*/ { type_face (true); language_print ($0); call (c_comment); type_face (false); } /\/\// { type_face (true); language_print ($0); call (eat_one_line); type_face (false); } /* String constants. */ /\"/ { comment_face (true); language_print ($0); call (c_string); comment_face (false); } /* Character constants. */ /'.'|'\\\\.'/ { comment_face (true); language_print ($0); comment_face (false); } /* Keywords. (build-re '(abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while)) */ /\b(a(bstract|s)|b(ase|ool|reak|yte)|c(a(se|tch)|h(ar|ecked)|lass|on(st|tinue))\ |d(e(cimal|fault|legate)|o(|uble))|e(lse|num|vent|x(plicit|tern))|f(alse|i(nally|xed)|loat|or)|goto\ |i(f|mplicit|n(|s|t(|er(face|nal))))|lo(ck|ng)|n(amespace|ew|ull)\ |o(bject|perator|ut|verride)|p(arams|r(ivate|otected)|ublic)|re(adonly|f|turn)\ |s(byte|ealed|hort|izeof|t(a(ckalloc|tic)|r(ing|uct))|witch)|t(h(is|row)|r(ue|y)|ypeof)\ |u(int|long|n(checked|safe)|s(hort|ing))|v(irtual|o(id|latile))|while)\b/ { function_name_face (true); language_print ($0); function_name_face (false); } } /* Local variables: mode: c End: */