Files
qt-creator/tests/unit/unittest
Hugo Holgersson 86aab16ea4 TextEditor: Highlight punctuators as Text
This change limits the set of tokens that fall under
Token::isOperator(). That allows cpphighlighter.cpp to
distinguish operator tokens from punctuator tokens
(without changing any logic in cpphighlighter.cpp).

This change moves punctuators from "Operator"
to the "Text" style category where they belong.
Punctuators are not operators. Punctuators are
dumb text tokens.

Why don't we let the clang backend alone separate
these tokens for us?

1. Clang is slow on big files. Sometimes the
   highlighting dictated by clang is painted _seconds_
   after cpphighlighter.cpp runs. CppHighlighter is way
   faster so we use it to "prepaint" code while clang is
   busy in the background.

2. Secondly, clang cannot yet handle all operator types.
   In particular, none if its "operator cursors"
     CXCursor_UnaryOperator:
     CXCursor_BinaryOperator:
     CXCursor_CompoundAssignOperator:
     CXCursor_ConditionalOperator:
   includes the -> and . operators.
   We still need CppHighlighter to paint those tokens.

However, once clang has finished processing the file some
operator tokens will be repainted. We need clang to get
all operators' semantics. In particular, we need clang to
tell us if < is a "smaller than"-operator or part of a
template parameter like set<int>.

Task-number: QTCREATORBUG-19659
Change-Id: I952cb58f7c79134b3281e2a8221425cc1d0ad263
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-03 13:43:16 +00:00
..
2016-09-19 15:17:54 +00:00
2016-09-19 15:17:54 +00:00
2018-04-09 05:25:40 +00:00
2018-04-09 05:25:40 +00:00
2016-11-15 15:30:33 +00:00
2018-01-16 15:32:15 +00:00
2017-01-31 14:18:38 +00:00
2017-01-31 14:18:38 +00:00
2017-12-05 10:26:24 +00:00
2018-01-16 14:00:28 +00:00
2017-10-05 17:36:37 +00:00
2017-10-05 17:36:37 +00:00
2017-10-05 17:36:37 +00:00
2016-09-19 15:17:54 +00:00
2017-10-05 17:36:37 +00:00
2017-02-01 13:11:15 +00:00
2017-01-30 13:55:58 +00:00
2016-11-23 12:16:04 +00:00
2016-11-23 12:16:04 +00:00
2016-11-15 15:30:33 +00:00
2018-04-09 05:25:40 +00:00
2016-09-19 15:17:54 +00:00
2016-09-19 15:17:54 +00:00
2018-04-09 05:25:40 +00:00
2018-04-09 05:25:40 +00:00
2016-09-19 15:17:54 +00:00
2017-10-05 17:36:37 +00:00
2018-04-09 05:25:40 +00:00
2016-11-23 12:16:04 +00:00
2016-11-23 12:16:04 +00:00
2018-04-12 14:38:51 +00:00
2018-01-16 15:32:15 +00:00
2016-09-19 15:17:54 +00:00