HackerTrans
TopNewTrendsCommentsPastAskShowJobs

fcurts

no profile record

comments

fcurts
·4 ปีที่แล้ว·discuss
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 ปีที่แล้ว·discuss
It uses heuristics to derive semantic information from the parse tree without doing a full semantic analysis.
fcurts
·4 ปีที่แล้ว·discuss
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 ปีที่แล้ว·discuss
> 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.).