X-Git-Url: https://git.tokkee.org/?p=go-talk.git;a=blobdiff_plain;f=tex%2Flstlang0.sty;fp=tex%2Flstlang0.sty;h=399a0240336e6ee4550d7446cace45c61671a034;hp=0000000000000000000000000000000000000000;hb=05a62c0fec1c93a0905edeeb51d4a77301348af4;hpb=8e533c849e5b0053a1949dcbf98f8948a7501499 diff --git a/tex/lstlang0.sty b/tex/lstlang0.sty new file mode 100644 index 0000000..399a024 --- /dev/null +++ b/tex/lstlang0.sty @@ -0,0 +1,35 @@ +%% Listings definition for Go language +%% Go language reference : http://www.golang.org +%% Author : Uriel Corfa +%% Project home: https://bitbucket.org/korfuri/golang-latex-listings + +\ProvidesFile{lstlang0.sty} + [2012/04/13 1.1 listings language file for GoLang] +\lst@definelanguage{Go}{ + % Keywords as defined in the BNF + morekeywords=[1]{break,default,func,interface,% + case,defer,go,map,struct,chan,else,goto,package,% + switch,const,fallthrough,if,range,type,continue,% + for,import,return,var,select}, + % Special identifiers, builtin functions + morekeywords=[2]{make,new,nil,len,cap,copy,complex,% + real,imag,panic,recover,print,println,iota,close,% + closed,_,true,false,append,delete}, + % Basic types + morekeywords=[3]{% + string,int,uint,uintptr,double,float,byte,% + int8,int16,int32,int64,int128,% + uint8,uint16,uint32,uint64,uint128,% + float32,float64,complex64,complex128,% + rune}, + % Strings : "toto", 'toto', `toto` + morestring=[b]{"}, + morestring=[b]{'}, + morestring=[b]{`}, + % Comments : /* comment */ and // comment + comment=[l]{//}, + morecomment=[s]{/*}{*/}, + % Options + sensitive=true +} +\endinput