[PATCH] D77702: [clangd] Use token modifiers and more token types for semanticTokens

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 20:09:27 PDT 2020


nridge created this revision.
nridge added a reviewer: sammccall.
Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Herald added a project: clang.

The intention here is to allow clients to continue using a different
color for each of our HighlightingKinds, as with the old API.

For some highlighting kinds, this is accomplished by adding more
token types (e.g. splitting "dependent" into "dependentType" and
"dependentName"). For others, it is accomplished by using token
modifiers.

Note that the patch introduces a "member" modifier in place of
the "member" token type. This allows member variables and member
functions to be colored differently, by using the "variable" and
"function" token types, respectively, combined with the "member"
modifier.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D77702

Files:
  clang-tools-extra/clangd/ClangdLSPServer.cpp
  clang-tools-extra/clangd/SemanticHighlighting.cpp
  clang-tools-extra/clangd/SemanticHighlighting.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77702.255882.patch
Type: text/x-patch
Size: 5461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200408/7210607c/attachment.bin>


More information about the cfe-commits mailing list