jeff-hykin / better-cpp-syntax

💾 The source of VS Code's C++ syntax highlighting
GNU General Public License v3.0
154 stars 29 forks source link

__clang__ colored incorrectly in #if defined #366

Open matter123 opened 5 years ago

matter123 commented 5 years ago

00

02

Originally posted by @peaceshi in https://github.com/jeff-hykin/cpp-textmate-grammar/issues/365#issuecomment-523874094

@peaceshi What file is this from?

peaceshi commented 5 years ago

https://github.com/lhmouse/asteria/blob/9785441189e0ece6675afb82bbd02a5d0fb406a1/asteria/rocket/compiler.h#L8

matter123 commented 5 years ago

@jeff-hykin This looks like 2 different bugs:

  1. defined(..) doesn't include the predefined macro context
  2. #elif defined(...) treats defined as a function.