diff options
author | Jannick <unknown> | 2017-08-28 17:00:46 +1000 |
---|---|---|
committer | Jannick <unknown> | 2017-08-28 17:00:46 +1000 |
commit | 9b0fe0af05ffc76aa031153f62610b1830554bad (patch) | |
tree | f2d6adb2d55f68a5b09c579a8aa6eb8f4a7f38cd | |
parent | 7c347102a548d811cd4cb31fabf3427f31516a53 (diff) | |
download | scintilla-mirror-9b0fe0af05ffc76aa031153f62610b1830554bad.tar.gz |
Backport: Bug [#1966]. Default value of 0 for undefined preprocessor symbols.
Backport of changeset 6380:89e44071e21e.
-rw-r--r-- | doc/ScintillaHistory.html | 6 | ||||
-rw-r--r-- | lexers/LexCPP.cxx | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 79d7afab6..c07618a5e 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -513,6 +513,7 @@ <td>Baldur Karlsson</td> </tr><tr> <td>Martin Kleusberg</td> + <td>Jannick</td> </tr> </table> <p> @@ -569,6 +570,11 @@ <a href="http://sourceforge.net/p/scintilla/bugs/1919/">Bug #1919</a>. </li> <li> + The C++ lexer improved preprocessor conformance. + Default value of 0 for undefined preprocessor symbols. + <a href="http://sourceforge.net/p/scintilla/bugs/1966/">Bug #1966</a>. + </li> + <li> The SQL lexer uses sql.backslash.escapes for double quoted strings. <a href="http://sourceforge.net/p/scintilla/bugs/1968/">Bug #1968</a>. </li> diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 08a95321e..10b5535ca 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -1582,8 +1582,8 @@ void LexerCPP::EvaluateTokens(std::vector<std::string> &tokens, const SymbolTabl tokens.insert(tokens.begin() + i, macroTokens.begin(), macroTokens.end()); } } else { - // Identifier not found - tokens.erase(tokens.begin() + i); + // Identifier not found and value defaults to zero + tokens[i] = "0"; } } else { i++; |