D14702: Java: add binaries & hex-float, and support underscores in numbers

Nibaldo González noreply at phabricator.kde.org
Thu Aug 9 10:01:07 BST 2018


nibags created this revision.
Restricted Application added projects: Kate, Frameworks.
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.
nibags requested review of this revision.

REVISION SUMMARY
  Some improvements in the highlighting of literal numbers:
  
  - BUG 386391
  
  Add binaries: `0b1010` [1][3].
  
  - Allow underscores in numbers (Float, Int, Hex, Octal & Binary) [2][3][4].
  
  NOTE: The exact format of the numbers supported can be found in ref. [3] & [4].
  
  
  
  - Add hexadecimal floating point: `0xA21.F18p+123` [4].
  
  - Add missing suffixes in numbers: "L" in Hex & Octal, and "D" in Float [3][4].
  
  **References:**
  
  - [1] Java (8) Documentation. Binary Literals: https://docs.oracle.com/javase/8/docs/technotes/guides/language/binary-literals.html
  - [2] Java (8) Documentation. Underscores in Numeric Literals: https://docs.oracle.com/javase/8/docs/technotes/guides/language/underscores-literals.html
  - [3] Java Language Specification. Chapter 3, Lexical Structure. [3.10.1] Integer Literals: https://docs.oracle.com/javase/specs/jls/se10/html/jls-3.html#jls-3.10.1
  - [4] Java Language Specification. Chapter 3, Lexical Structure. [3.10.2] Floating-Point Literals: https://docs.oracle.com/javase/specs/jls/se10/html/jls-3.html#jls-3.10.2

REPOSITORY
  R216 Syntax Highlighting

BRANCH
  java-improve-numbers

REVISION DETAIL
  https://phabricator.kde.org/D14702

AFFECTED FILES
  autotests/folding/highlight.java.fold
  autotests/html/highlight.java.html
  autotests/input/highlight.java
  autotests/reference/highlight.java.ref
  data/syntax/java.xml

To: nibags
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180809/adbcc6a3/attachment.html>


More information about the KWrite-Devel mailing list