oak-cobol 0.0.11

High-performance incremental COBOL parser for the oak ecosystem with flexible configuration.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! MCP support for COBOL.
use crate::lsp::CobolLanguageService;
use oak_vfs::MemoryVfs;

/// Serves the COBOL Model Context Protocol (MCP) server.
#[cfg(feature = "mcp")]
pub async fn serve_cobol_mcp(vfs: MemoryVfs) {
    let service = CobolLanguageService::new(vfs);
    let server = oak_mcp::McpServer::new(service);
    let reader = tokio::io::BufReader::new(tokio::io::stdin());
    let writer = tokio::io::BufWriter::new(tokio::io::stdout());
    server.run(reader, writer).await.unwrap()
}