forked from github/texlab
debug: add a new textDocument/previewParseTree command #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I want to (long term) make contributions to Texlab. However, I cannot make sense of their parser. So, add a new LSP command/endpoint to get a JSON or tree-like representation of the parsed syntax tree for a file. It could be called
textDocument/previewParseTreeas suggested in the title of the issue, or something else. Needs to signal the command is relative to the document only, so maybe keep thetextDocumentprefix ?Clangd does this for the C++ AST using the
textDocument/astmethod. Links to:github.com/llvm/llvm-project@f43c0e2dac/clang-tools-extra/clangd/ClangdLSPServer.cpp (L1657-L1660)Server::getASTfunction:github.com/llvm/llvm-project@f43c0e2dac/clang-tools-extra/clangd/ClangdServer.cpp (L1084-L1121)