-
Notifications
You must be signed in to change notification settings - Fork 26
IO handling
The purpose of the dispatcher
is to execute an infinite loop in which it read JSON messages from json_source
and passes them to the request_manager
. At the same time, it is able to write responses in the correct format.
The language server communicates with the LSP client either via standard input and output or a TCP/IP connection, in the case of running under Node.js only standard I/O channels are supported.
In the case of TCP/IP, the VS Code extension identified a free TCP port and passes it to the language server as an argument. Thanks to the ASIO library (see third party libraries) implementation of the std::iostream
interface, the implementation is able to completely abstract from the fact that it is communicating through TCP and not through the standard IO.
The DAP communication is tunneled via notification messages through the existing LSP channel. Incoming messages are routed to the correct components via message_router
class. In case of DAP messages the incoming message envelop is stripped away by dap::unmessage_wrapper
, similarly outgoing messages are wrapped by dap::message_wrapper
. Both of these classes implement json_source
or json_sink
respectively to shield the server implementation from this implementation detail.
Once the macro tracer is started, a registration message is processed by the server and a new dap_session
is started by the dap_session_manager
to handle the debugging session.
Both the LSP server and (possibly multiple) DAP servers run in their own thread. All of them use simple blocking_queue
for passing parsed JSON objects from the main thread.
I. Project overview
II. Component description
-
Language server
4.1 LSP and DAP
4.2 Language server overview
4.3 IO handling
4.4 LSP and DAP server
4.5 Request manager -
Workspace manager
5.1 Parser library API
5.2 Libraries configuration
5.3 Workspace manager overview -
Analyzer
6.1. LSP data collector
6.2. Processing manager
6.2.1 Statement providers
6.2.2 Statement processors
6.2.3 Instruction processors
6.2.4 Expressions
6.3. Instruction format validation
6.4. Lexer
6.5. Parser
6.6. HLASM context tables - Macro tracer
- Extension
III. Dependencies and Build Instructions