Re:Autocomplete as an Interface (2015)
by cdo256 on Friday January 17, 2020 @08:55AM
(#22074603)
I could imagine two tools:
1. A tool that parses the text and draws red underlines on all the errors, this exists but (at least for C++ in VS 2017) it is quite slow.
2. A tool that automatically populates and updates types of variables and functions.
Both of these could be achieved by somehow decoupling the front-end (as in before semantic analysis) of compilers and making them output the AST in some standardized tree-structured format like XML.
Re:Autocomplete as an Interface (2015)
by dr_baba on Saturday January 18, 2020 @06:48AM
(#22083893)
Doesn’t the Language Server Protocol already do this, just via JSON instead of XML? I believe at least some LSP backends (e.g. clangd) just reuse a compiler AST and feed the data to your editor?
Both of these could be achieved by somehow decoupling the front-end (as in before semantic analysis) of compilers and making them output the AST in some standardized tree-structured format like XML.