[Vala] Vala highlightening for LaTeX lstlisting



Hi,

I wrote a small definition to get highlightening in latex lstlistings.
It's based on the c# syntax and adds some vala specific Keywords. I
don't know if anything is missing. Could you help me to complete it,
that it can be send upstream and everyon can use it?

btw. lstlistings has same problem with """ strings. """\324"""" produces
wrong output.

to test it:

add these line to your
/usr/share/texmf-texlive/tex/latex/listings/lstlang1.sty
(path may differ ;))

%%
%% Vala definitions
%%
\lst definelanguage{Vala}[Sharp]{C}%
  {morekeywords={CCode,DBus,Test,cname,cheader_filename,type_id,%
      marshaller_type_name,get_value_function,set_value_function,%
      default_value,IntegerType,rank,type_signature,size_t,int8,int16,%
      int32,uint32,uint16,uint8,int64,uint64,float,double,time_t,%
      SimpleType,unichar,cprefix,has_type_id,get,set,ref_function,%
      unref_function,free_function,has_target,Compact,delegate,%
      destroy_function,PrintFormat,Diagnostics,FILE,LINE,METHOD,%
      errordomain,array_length_type,has_array_length,is_null_terminated,%
      ReturnsModifiedPointer,dup_function,weak,owned,unowned,value,var,%
      connect,async},%
    morecomment=[s]{"""}{"""}
    }[keywords,strings]

Regards, Frederik
-- 
IRC: playya @ Freenode, Gimpnet
xmpp: playya draugr de

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]