vscode-arduino-tools icon indicating copy to clipboard operation
vscode-arduino-tools copied to clipboard

Incorrect syntax highlighting after some preprocessor directives

Open yodapuces63 opened this issue 3 years ago • 1 comments

Describe the problem

After #elif and #error, the text are wrong coloured see de screenshot

2022-10-29_18-36-00

To reproduce

Copy this in editor

//---Config pour l'ESP-----------------------
#ifdef ARDUINO_ESP8266_GENERIC
  #define ESPMOD      //pour module ESP12
  #define TelNetDEBUG       //mode TelNet debug (via port 23)
//#define CommErTRACE         //TRACE les compteurs d'erreures de comm

//---Config pour le ProMini------------------
#elif ARDUINO_AVR_PRO
  #define PROMOD      //pour module ProMini

#else
  #error              //Si pas une de ces deux carte => Stop la compilation
#endif

Expected behavior

#elif definition should be blue #error //comment should be green

Arduino IDE version

2.0.1

Operating system

Windows

Operating system version

10

Additional context

Additional reports

  • https://forum.arduino.cc/t/ide-frontend-problems/1254933

Issue checklist

  • [X] I searched for previous reports in the issue tracker
  • [X] I verified the problem still occurs when using the latest nightly build
  • [X] My report contains all necessary details

yodapuces63 avatar Oct 29 '22 16:10 yodapuces63