aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexCPP.cxx
AgeCommit message (Collapse)AuthorFilesLines
2020-05-01Backport: Make lambdas noexcept.Zufu Liu1-1/+1
Backport of changeset 8222:b11c7c0d7978.
2020-04-13Backport: Hide implementation of EscapeSequence and use const. Add tests for ↵Neil1-13/+12
escape sequences. Backport of changeset 8144:ce9d95250569.
2020-04-13Backport: Replace islower function and add tests for JavaScript regular ↵Neil1-3/+2
expressions. Backport of changeset 8143:a5eb440dc1e2.
2020-04-13Backport: Use constexpr and noexcept, reduce headers and use C++ versions, ↵Neil1-12/+10
harmonize types a bit. Backport of changeset 8142:a823c9510148.
2020-01-06More synchronizing LongTerm3 with default.mitchell1-5/+7
Ideally this covers anything missed during the backport process.
2020-01-04Backport: Define ILexerWithIdentity with methods for retrieving name, ID, ↵mitchell1-2/+15
and property values. Implement ILexerWithIdentity on object lexers. Implement ILexerWithIdentity on LexerSimple wrapper for function lexers. Backport of changeset 7870:6ffcbd42288c, but with a new interface compatible with ILexer, not ILexer5.
2019-03-23Backport: Simplified preprocessor conditional styling code, renamed 'active' ↵Neil1-33/+63
to 'inactive' as that is more correct, added comments and helper methods, removed lines that had no effect. Behaviour unaltered. Backport of changeset 7343:47c846cb9d17.
2019-03-23Backport: Fix warnings from MSVC Code Analysis.Neil1-30/+37
Backport of changeset 7328:521b1e23bfe2, but without C++17 std::size and `SymbolValue() = default` instead of `SymbolValue() noexcept = default`, since the latter causes a compile error.
2019-01-15Backport: Treat "#if(" as preprocessor directive "#if" followed by operator "(".Neil1-1/+1
Backport of changeset 7233:e08fe2381ca3.
2018-12-12Backport: Bug [#2069]. LexerCPP: modernize int to std::string conversionJannick1-3/+1
* LexCPP.cxx (LexerCPP::EvaluateTokens): Use std::to_string to convert int to std::string. Backport of changeset 7185:bff457790150.
2018-12-12Backport: Bug [#2069]. LexCPP: fix bug in arithmetic calculation by adding ↵Jannick1-5/+9
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.
2018-12-04Backport: Bug [#2062]. Interpret continued preprocessor lines correctly by ↵Neil1-10/+20
reading all of the logical line. Backport of changeset 7182:a40b6aac5b1f.
2018-09-24Backport: Bug [#2045]. LexCPP: Fix 'elif' token lengthhuki1-1/+1
Backport of changeset 7094:fa4b41e8a452.
2018-09-18Backport: Guard against shifting by negative amount as that is undefined ↵Neil Hodgson1-1/+5
behaviour. Backport of changeset 7090:041e498f21d3.
2018-06-04Backport: Use const and noexcept, initialize, avoid casts and improve ↵Neil1-29/+29
variable name. Backport of changeset 7020:9e7cc77d3970.
2018-06-04Backport: Use lambda in preference to function object.Neil1-10/+2
Backport of changeset 7019:6023ccf7f06c.
2018-04-14Backport: Undo some changes that snuck in the last change set.Neil1-7/+7
Backport of changeset 6688:281d0952d89b.
2018-05-05Backport: Make some changes recommended by clang-tidy.mitchell1-9/+10
Backport of changeset 6687:4cbf987c7590.
2017-09-11Backport: The Scintilla namespace is always active for internal symbols and ↵Neil1-2/+0
for the lexer and document interfaces. Backport of changeset 6388:d62863ae40a3.
2017-08-28Backport: Bug [#1966]. "defined A" removes "A" before replacing "defined" ↵Jannick1-0/+1
with value. Backport of changeset 6382:f5aebab4fb4b.
2017-08-28Backport: Bug [#1966]. #define A is treated as #define A 1.Jannick1-0/+2
Backport of changeset 6381:e4cfaeddf3a3.
2017-08-28Backport: Bug [#1966]. Default value of 0 for undefined preprocessor symbols.Jannick1-2/+2
Backport of changeset 6380:89e44071e21e.
2017-07-17Backport: Fix signed / unsigned comparison warnings.Neil1-4/+4
Backport of changeset 6354:4914db52c782.
2017-07-17Backport: Mark overriding methods as "override".Neil Hodgson1-4/+4
Backport of changeset 6350:fdc0103a84d0.
2017-07-17Backport: Implement style metadata for some languages.Neil1-6/+81
Add some helper methods to SubStyles for finding style metadata of substyles. Backport of changeset 6349:f350a2543488.
2017-06-22Backport: Add style metadata methods with null implementations.Neil1-4/+16
Backport based on changesets 6345:faecbd0078e5 and 6346:72bd27f81477.
2017-04-09Further use of range-for.Neil1-9/+9
2017-04-07Prefer C++ static cast over C-style casts.Neil1-3/+3
2017-04-06Added const to some lexers.Neil1-21/+21
2017-03-04Use C++11 keyword "override" for methods in lexers that override an interface.Neil1-21/+21
2016-11-05StyleContext no longer needs mask argument.Neil1-1/+1
Remove warning suppression pragma no longer needed for Perl's StyleContext.
2016-08-30Feature [feature-requests:#210]. Allow folding on #else and #elif.Neil1-2/+13
2016-08-20Use const reference parameter when it can prevent extra copies.Neil1-1/+1
2016-04-23Fix a bug with multi-line strings with line continuation where the string styleActiveState1-0/+3
overflowed after an edit.
2016-03-03CPP: Add support for folding on `(` and `)`Colomban Wendling1-2/+2
Feature [feature-requests:#1138].
2015-11-20Remove line end whitespace.Neil1-3/+3
2015-07-30Use Sci_Position / Sci_PositionU for variables in lexers that representJoe Mueller1-28/+28
positions and line numbers and may be widened to 64-bits in a future release.
2015-07-20Use Sci_Position when required to implement interfaces.Neil1-8/+8
2015-05-12Bug [#1719]. Fix #undef directive.Neil1-3/+2
2015-04-22Fix highlighting empty backquote strings (``) in cpp lexerJiří Techet1-1/+0
The sc.Forward() is performed once more at the end of the function and performing it here causes the second ` is skipped in ``. Probably caused by copy-pasting the code above and not realizing this one reads just a single character.
2015-02-19Implement lexer.cpp.verbatim.strings.allow.escapes.Neil Hodgson1-1/+8
2014-11-28LexCPP: Also fold on square bracketsColomban Wendling1-2/+2
This allows to fold on array literals for languages like JavaScript that use square brackets to declare array literals. This should not change much for languages that only use square brackets for array indexation as the large majority of the time the open and close brackets are placed on the same line in these cases.
2014-06-19Bug [#1614]. Don't crash on incomplete macro definition "#define x(".Neil Hodgson1-1/+3
2014-05-31Safer handling of "#define X" which caused fault in debug build with Visual C++.Neil1-1/+1
2014-05-24Header include statements are now in a standardised order with that orderNeil1-1/+1
defined in scripts/HeaderOrder.txt.
2014-05-24Fix raw string recognition so that R"xxx(blah)xxx" is styled as SCE_C_STRINGRAW.Neil1-3/+11
2014-01-20Fix typos in comments (lexers)Stefan Weil1-2/+2
2014-05-14Limit iterations when expanding macros in case a macro is recursive such asNeil1-1/+4
#define MAC(x) MAC(x+1) Also fixes macros that are co-recursive with other macros.
2014-05-13Feature [feature-requests:#1051]. Fixed shadowed local variable.Neil1-1/+1
2014-05-12Feature [feature-requests:#1051]. Support #if defined SYMBOL.Neil1-94/+252
Previously required braces around like #if defined(SYMBOL). Also understand macros with arguments such as version checking macros like #if GTK_CHECK_VERSION(2,22,0)