Architecture design
Components
Each component may consist of several packages, but there should be a clear separation between each component.
Parser loader
This component should keep track of loaded parser modules.
Analyzer loader
This component should keep track of loaded analyzer modules.
Parser interface
This component should provide a unified interface for parsers to implement.
Analyzer interface
This component should provide a unified interface for analyzers to implement.
App interface
This component should provide a unified interface for apps to use, such as a RPC server, CLI, and LSP server.
Kernel
This component glues the other components together. It does the following things:
- Instruct the module loader to load modules.
- Instructs the analyzer loader to load analyzers.
- Takes buffers from the tools and forwards them to the modules for parsing.
- Takes the parsed buffers and sends them to the analyzers.
- Takes the diagnostics from the analyzers and gives them back to the tools.