Changeset e7b04a3


Ignore:
Timestamp:
Feb 12, 2024, 1:10:36 PM (3 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
c0d8e62, f431ab26
Parents:
c185ca9
Message:

add swift language macros for formatting by lstlisting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/LaTeXmacros/lstlang.sty

    rc185ca9 re7b04a3  
    88%% Created On       : Sat May 13 16:34:42 2017
    99%% Last Modified By : Peter A. Buhr
    10 %% Last Modified On : Thu Sep 21 08:40:05 2023
    11 %% Update Count     : 31
     10%% Last Modified On : Thu Feb  8 14:38:38 2024
     11%% Update Count     : 32
    1212%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    1313
     
    138138}
    139139
     140\lstdefinelanguage{swift}{
     141        morekeywords={
     142                open,catch,@escaping,nil,throws,func,if,then,else,for,in,while,do,switch,case,default,where,break,continue,fallthrough,return,
     143                typealias,struct,class,enum,protocol,var,func,let,get,set,willSet,didSet,inout,init,deinit,extension,
     144                subscript,prefix,operator,infix,postfix,precedence,associativity,left,right,none,convenience,dynamic,
     145                final,lazy,mutating,nonmutating,optional,override,required,static,unowned,safe,weak,internal,
     146                private,public,is,as,self,unsafe,dynamicType,true,false,nil,Type,Protocol,
     147        },
     148        morecomment=[l]{//}, % l is for line comment
     149        morecomment=[s]{/*}{*/}, % s is for start and end delimiter
     150        morestring=[b]", % defines that strings are enclosed in double quotes
     151        breaklines=true,
     152        escapeinside={\%*}{*)},
     153        captionpos=b,
     154        breakatwhitespace=true,
     155}
     156
    140157% Local Variables: %
    141158% tab-width: 4 %
Note: See TracChangeset for help on using the changeset viewer.