HackerTrans
トップ新着トレンドコメント過去質問紹介求人

fcurts

no profile record

コメント

fcurts
·4 年前·議論
Semantic analysis is a broader term that (for languages with a type checker) includes type checking. https://cs.lmu.edu/~ray/notes/semanticanalysis/
fcurts
·4 年前·議論
It uses heuristics to derive semantic information from the parse tree without doing a full semantic analysis.
fcurts
·4 年前·議論
What's "dumb" about Anycode is its semantic features such as "go to definition", code completion, etc., not its syntax highlighting. Alas, Anycode is a separate project.
fcurts
·4 年前·議論
> The tokenization speed issue is already addressed by the language server protocol [...]

It's not really addressed. The semantic tokens API is intended for semantic highlighting:

> Semantic tokenization allows language servers to provide additional token information based on the language server's knowledge on how to resolve symbols in the context of a project.

Abusing the semantic tokens API for syntactic highlighting is slow, unnecessarily complex (why do I need to implement a language server just to do syntactic highlighting?), and only a partial solution (still need a TM grammar, still don't get correct code folding, etc.).