Update listings definition for Java which is the default language when using listings.

This commit is contained in:
Wandmalfarbe 2019-08-04 16:30:09 +02:00
parent 537bf1c794
commit 0afdba6c59

View File

@ -711,6 +711,44 @@ $endif$
}
\lstset{style=eisvogel_listing_style}
%
% Java (Java SE 12, 2019-06-22)
%
\lstdefinelanguage{Java}{
morekeywords={
% normal keywords (without data types)
abstract,assert,break,case,catch,class,continue,default,
do,else,enum,exports,extends,final,finally,for,if,implements,
import,instanceof,interface,module,native,new,package,private,
protected,public,requires,return,static,strictfp,super,switch,
synchronized,this,throw,throws,transient,try,volatile,while,
% var is an identifier
var
},
morekeywords={[2] % data types
% primitive data types
boolean,byte,char,double,float,int,long,short,
% String
String,
% primitive wrapper types
Boolean,Byte,Character,Double,Float,Integer,Long,Short
% number types
Number,AtomicInteger,AtomicLong,BigDecimal,BigInteger,DoubleAccumulator,DoubleAdder,LongAccumulator,LongAdder,Short,
% other
Object,Void,void
},
morekeywords={[3] % literals
% reserved words for literal values
null,true,false,
},
sensitive,
morecomment = [l]//,
morecomment = [s]{/*}{*/},
morecomment = [s]{/**}{*/},
morestring = [b]",
morestring = [b]',
}
\lstdefinelanguage{XML}{
morestring = [b]",
moredelim = [s][\bfseries\color{listing-keyword}]{<}{\ },