rouge icon indicating copy to clipboard operation
rouge copied to clipboard

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

Open Snowman-s opened this issue 2 years ago • 0 comments

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

Snowman-s avatar Apr 13 '23 03:04 Snowman-s