aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc
diff options
context:
space:
mode:
authorJannick <unknown>2018-12-12 08:38:19 +1100
committerJannick <unknown>2018-12-12 08:38:19 +1100
commitcb6e496d5fef85a7305db64e0874fdb0b78fd04b (patch)
tree1b7797e48519b2e5e2f39a43bf5cb77f354da992 /doc
parent94a64113360712aeee95725ebd3a97a21b3abb61 (diff)
downloadscintilla-mirror-cb6e496d5fef85a7305db64e0874fdb0b78fd04b.tar.gz
Backport: Bug [#2069]. LexCPP: fix bug in arithmetic calculation by adding precedence levels
The precedence for the implemented arithmetic operators +,-,%,*,/ is added, such that the calculations produce the correct results honoring the standard precedence levels. * Replace characterset setArithmeticOp by setAddOp and setMultOp. * Replace precedence precArithmetic by precMult and precAdd * (EvaluateTokens): Apply new precedences. This fixes the bug in the arithmetic calculation: // lines with 'false' should not be highlighted, // those with 'true' should be. #if 1 + 2 * 3 == 9 false #endif #if (1 + 2) * 3 == 9 true #endif #if 1 + 2 * 3 == 7 true #endif #if 1 == 5 % 2 true #endif #if 6 - 7 == -1 true #endif #if 25 / 5 * 5 == 25 true #endif #if 1 + 2 * 3 % 2 == 1 true #endif #if 1 + 2 * 3 % 2 == 2 + 1 false #endif Backport of changeset 7184:48861f53f719.
Diffstat (limited to 'doc')
-rw-r--r--doc/ScintillaHistory.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index b8225bcc5..1cc91e184 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -557,11 +557,16 @@
<li>
The Bash lexer implements substyles for multiple sets of keywords and supports SCI_PROPERTYNAMES.
<a href="https://sourceforge.net/p/scintilla/bugs/2054/">Bug #2054</a>.
+ </li>
<li>
The C++ lexer interprets continued preprocessor lines correctly by reading all of
the logical line.
<a href="https://sourceforge.net/p/scintilla/bugs/2062/">Bug #2062</a>.
</li>
+ <li>
+ The C++ lexer interprets preprocessor arithmetic expressions containing multiplicative and additive
+ operators correctly by following operator precedence rules.
+ <a href="https://sourceforge.net/p/scintilla/bugs/2069/">Bug #2069</a>.
</li>
<li>
Notify with SC_UPDATE_SELECTION when user performs a multiple selection add.