Author |
Topic |
|
billhilly
New Member
2 Posts |
Posted - May 11 2018 : 03:51:29 AM
|
I am having trouble with class (C++) object colouring. It is not consistent.
Some class object names show up correctly, same colour as variables, But others sometimes revert to the colour of functions. Although not consistent it seems to happen when there is more than 1 level of include to go through to get to the class object declaration.
ie in blah.h // extern obj colour ok in blah.cpp // object created colour ok in main colour wrong where blah.h is included through blahblah.h
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - May 11 2018 : 06:47:06 AM
|
When you see this problem, if you place the caret into the class member with the wrong colour, what is VA showing in its context and navigation fields? These are normally at the top of the editor window, and are where the alt-m list appears.
If you press alt-g what happens? You should be taken to the class member declaration, but if this is happening because something is confusing our parser something else may happen. |
zen is the art of being at one with the two'ness |
|
|
billhilly
New Member
2 Posts |
Posted - May 11 2018 : 8:00:03 PM
|
Hi Feline, i dont have any carrots :<, but alt g does take you to the class declaration.
this causes colours to be wrong ------------------------------------------------- const uint8_t sz = 24; uint8_t test_storage[sz]; Byte_Buffer my_buf(test_storage, sz); // wrong
int main(void) { my_buf.flush (); // wrong }
but this creates the correct colours ------------------------------------------------- const uint8_t sz = 24; uint8_t test_storage[sz];
int main(void) { Byte_Buffer my_buf(test_storage, sz); my_buf.flush (); }
declared inside main seems to be ok |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - May 12 2018 : 09:10:52 AM
|
Thank you for the clear example, I am seeing the same problem here. This is currently a known problem, I have added this example to the bug report:
case=60805
The problem case looks like a function declaration, especially since it is at global scope. Our colouring code is designed to run quickly, so it can keep up with code scrolling, so it is possible to confuse it now and then, as has happened here. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|