langs.sty
changeset 345 7f0ac1355f0b
parent 336 3cb200fa6d6a
equal deleted inserted replaced
344:fc6aa28945c0 345:7f0ac1355f0b
    37   morecomment=[n]{/*}{*/},
    37   morecomment=[n]{/*}{*/},
    38   morestring=[b]",
    38   morestring=[b]",
    39   otherkeywords={=,!=,:=,<,>,\%;*,/},
    39   otherkeywords={=,!=,:=,<,>,\%;*,/},
    40 }[keywords,comments,strings]
    40 }[keywords,comments,strings]
    41 
    41 
       
    42 \lstdefinelanguage{JavaScript}{
       
    43   keywords={break, case, catch, continue, debugger, default, delete, do, else, false, finally, for, function, if, in, instanceof, new, null, return, switch, this, throw, true, try, typeof, var, void, while, with},
       
    44   morecomment=[l]{//},
       
    45   morecomment=[s]{/*}{*/},
       
    46   morestring=[b]',
       
    47   morestring=[b]",
       
    48   ndkeywords={class, export, boolean, throw, implements, import, this},
       
    49   keywordstyle=\color{codepurple},
       
    50   ndkeywordstyle=\color{codepurple},
       
    51   identifierstyle=\color{black},
       
    52   commentstyle=\color{codegreen},
       
    53   stringstyle=\color{codegreen},
       
    54   sensitive=true
       
    55 }
       
    56 
    42 \lstdefinestyle{mystyle}
    57 \lstdefinestyle{mystyle}
    43        {basicstyle=\ttfamily,
    58        {basicstyle=\ttfamily,
    44 	keywordstyle=\color{codepurple}\bfseries,
    59 	keywordstyle=\color{codepurple}\bfseries,
    45 	stringstyle=\color{codegreen},
    60 	stringstyle=\color{codegreen},
    46 	commentstyle=\color{codegreen},
    61 	commentstyle=\color{codegreen},