Does the code run as expected, or do you get a syntax error?
One would assume, another genuine error elsewhere notwithstanding, that what you’re seeing is simply the editor getting confused.
An IDE, or a code editor in the case of the learning environment, may have features which make things easier for the programmer - like changing the colour of the text to reflect different aspects of the program, so that keywords (e.g.
for) and variables (e.g.
button) are stylistically distinct.
Just because the text colour has changed and you’re seeing
These things are meant as aids to the programmer, and occasionally they do get it wrong. That’s where it falls to you, as the person writing the program and who is ultimately responsible for what it does or does not do, to look at it and make a judgement as to whether you have made an error there or you’ve simply encountered the coding equivalent of a sat-nav briefly losing GPS and sending you down a wrong side street.