rouge-ruby / rouge

A pure Ruby code highlighter that is compatible with Pygments
https://rouge.jneen.net/
Other
3.3k stars 732 forks source link

Java: The lexer do not recognize "Hexadecimal-Floating-Point-Literal". #1941

Open Snowman-s opened 1 year ago

Snowman-s commented 1 year ago

Name of the lexer Java

Code sample

All of floating-point literals start with "0x" in below code are not highlighted well.

System.out.print(0x1p-1); // 0.5
System.out.print(0x.1p-2); // 0.015625
System.out.print(0x.1p0); // 0.0625

image

(I cannot show example on rouge.jneen.net, because that page is down. Sorry.)

Additional context Specifications can be seen here: https://docs.oracle.com/javase/specs/jls/se20/html/jls-3.html#jls-3.10.2 image