Skip to content

(java) Support for Hexadecimal Floating Point Literals #2507

@0xflotus

Description

@0xflotus

Describe the issue

Which language seems to have the issue?

According to Oracle Blog Hexadecimal Floating Point Literals are supported in Java.

Are you using highlight or highlightAuto?

highlight

Sample Code to Reproduce

Cases a-h are all legal literals in Java, tested on JShell Version 13.0.2

https://jsfiddle.net/ohqapxnc/

a = 0x4fa6p2; // 81560.0
b = 0x.4p2; // 1.0
c = 0xa.ffp3f; // 87.96875
d = 0x1.0p2F; // 4.0
d2 = 0x1.p2; // 4.0
e = 0x1.0p2f; // 4.0
f = 0x1p1; // 2.0
g = 0x.3p4d; // 3.0
h = 0x1.2ep5D; // 37.75

Expected behavior

I would expect that all legal literals are highlighted as numbers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions