jvikstrom added inline comments.

================
Comment at: 
clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:131
+    this.rules.forEach((rule) => {
+      if (rule.scope.length <= scope.length &&
+          scope.substr(0, rule.scope.length) === rule.scope &&
----------------
hokein wrote:
> hmm, here comes the question, we need algorithm to find the best match rule. 
> not doing it in this patch is fine, please add a FIXME.
> 
> could you also document what's the strategy using here?
But isn't the best match for a scope just the rule that is the longest prefix 
of the scope (or a perfect match if one exists)? (as that should be the most 
specific rule)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65856/new/

https://reviews.llvm.org/D65856



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to