Review Request 110638: Fix every compound assignment operator being regognized as "+="

Sven Brauch svenbrauch at gmx.de
Sun May 26 13:43:08 UTC 2013



> On May 26, 2013, 1:10 p.m., Milian Wolff wrote:
> > Excellent work indeed!
> > 
> > /me who now thinks that Sven is finally lured by the "dark side" to work more and more on KDevelop C++/core stuff instead of Python :P

We'll see ;)
Python working quite okay by now and not requiring much maintenance surely makes it easier to work on other things.


- Sven


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110638/#review33152
-----------------------------------------------------------


On May 26, 2013, 1:39 p.m., Sven Brauch wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110638/
> -----------------------------------------------------------
> 
> (Updated May 26, 2013, 1:39 p.m.)
> 
> 
> Review request for KDevelop and Milian Wolff.
> 
> 
> Description
> -------
> 
> It was noticed that before this change, all operators in statements
> such as
>     Foo a, b;
>     a ^= b;
>     a &= b;
> etc. will be displayed as uses of Foo::operator+=(), which is obviously
> wrong. The reason for this was some rather curious code, which just
> treated every of these operators as "Token_assign" in the lexer,
> and some other code which treated each "Token_assign" as "+=" in the
> analyzer. To fix the issue, this had to be sorted out.
>     - Token_assign doesn't make sense anyways, since assignments are
>     represented as "=". So, remove the token completely.
>     - Instead of lexing every compound assignment operator as "Assign",
>     yield different token types for each.
>     - In the code which handles the operators, change the function from
>     using its own list of tokenkind -- tokenText mapping to use the
>     official one.
> Also included is a unit test for the fix.
> 
> 
> Diffs
> -----
> 
>   languages/cpp/cppduchain/builtinoperators.cpp 0def471 
>   languages/cpp/cppduchain/expressionvisitor.cpp 3db7be0 
>   languages/cpp/cppduchain/tests/test_duchain.h ebc1ee8 
>   languages/cpp/cppduchain/tests/test_duchain.cpp f83416b 
>   languages/cpp/parser/lexer.cpp b39387a 
>   languages/cpp/parser/parser.cpp 41f00ec 
>   languages/cpp/parser/tokens.h dd173a3 
>   languages/cpp/parser/tokens.cpp 9086a8e 
> 
> Diff: http://git.reviewboard.kde.org/r/110638/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Sven Brauch
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20130526/037476cf/attachment-0001.html>


More information about the KDevelop-devel mailing list