<table><tr><td style="">nibags created this revision.<br />Restricted Application added projects: Kate, Frameworks.<br />Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel.<br />nibags requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D14702">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Some improvements in the highlighting of literal numbers:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">BUG 386391</li>
</ul>

<p>Add binaries: <tt style="background: #ebebeb; font-size: 13px;">0b1010</tt> [1][3].</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Allow underscores in numbers (Float, Int, Hex, Octal & Binary) [2][3][4].</li>
</ul>

<div style="margin: 16px 0;
            padding: 12px;
            border-left: 3px solid #2980b9;
            background: #daeaf3;"><span class="remarkup-note-word">NOTE:</span> The exact format of the numbers supported can be found in ref. [3] & [4].</div>



<ul class="remarkup-list">
<li class="remarkup-list-item">Add hexadecimal floating point: <tt style="background: #ebebeb; font-size: 13px;">0xA21.F18p+123</tt> [4].</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">Add missing suffixes in numbers: "L" in Hex & Octal, and "D" in Float [3][4].</li>
</ul>

<p><strong>References:</strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">[1] Java (8) Documentation. Binary Literals: <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/language/binary-literals.html" class="remarkup-link" target="_blank" rel="noreferrer">https://docs.oracle.com/javase/8/docs/technotes/guides/language/binary-literals.html</a></li>
<li class="remarkup-list-item">[2] Java (8) Documentation. Underscores in Numeric Literals: <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/language/underscores-literals.html" class="remarkup-link" target="_blank" rel="noreferrer">https://docs.oracle.com/javase/8/docs/technotes/guides/language/underscores-literals.html</a></li>
<li class="remarkup-list-item">[3] Java Language Specification. Chapter 3, Lexical Structure. [3.10.1] Integer Literals: <a href="https://docs.oracle.com/javase/specs/jls/se10/html/jls-3.html#jls-3.10.1" class="remarkup-link" target="_blank" rel="noreferrer">https://docs.oracle.com/javase/specs/jls/se10/html/jls-3.html#jls-3.10.1</a></li>
<li class="remarkup-list-item">[4] Java Language Specification. Chapter 3, Lexical Structure. [3.10.2] Floating-Point Literals: <a href="https://docs.oracle.com/javase/specs/jls/se10/html/jls-3.html#jls-3.10.2" class="remarkup-link" target="_blank" rel="noreferrer">https://docs.oracle.com/javase/specs/jls/se10/html/jls-3.html#jls-3.10.2</a></li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>BRANCH</strong><div><div>java-improve-numbers</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D14702">https://phabricator.kde.org/D14702</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/highlight.java.fold<br />
autotests/html/highlight.java.html<br />
autotests/input/highlight.java<br />
autotests/reference/highlight.java.ref<br />
data/syntax/java.xml</div></div></div><br /><div><strong>To: </strong>nibags<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>