Open HighCommander4 opened 3 years ago
could possibly add #endif
etc to [[
?
idk how badly it would intersect with other stuff
and obviously would need to add all the extra #endif
checks to it
(?=^((?:((?:\\s*+\\/\\*(?:[^\\*]++|\\*+(?!\\/))*+\\*\\/\\s*+)+)|(?:\\s++)|(?<=\\W)|(?=\\W)|^|(?:\\n?$)|(?:\\A)|(?:\\Z)))(#)(?:(?:\\s)+)?((?<!\\w)(?:endif|else|elif)(?!\\w)))
For the program to run correctly under all cases, there needs to be a closing ]]
somewhere.
e.g. if FOO is defined, the syntax of the C++ is broken.
The code with a problem is:
Lines after the preprocessor-disabled section do not get highlightings.
Inspecting the scopes, it looks like they get
entity.other.attribute.int.cpp
. I guess that's related to the fact that[[
opens an attribute.(Originally reported at https://github.com/clangd/clangd/issues/882.)