Company
Date Published
Author
Anna Herlihy, Alena Khineika, Irina Shestak
Word count
4242
Language
English
Hacker News points
None

Summary

The Compass BSON transpiler plugin allows developers to work in their chosen programming language when using MongoDB Compass, enabling flexibility and ease of use. The plugin leverages the open-source parsing tool ANTLR to minimize complexity and supports multiple input languages (MongoDB Shell, JavaScript, and Python) and output languages (Java, C#, Python, MongoDB Shell, and JavaScript). The transpiler is built as a standalone Node.js module and can be used in any browser-based or Node.js application. It uses a modular design, allowing users to contribute new input and output languages without requiring knowledge of existing languages. The plugin's latest version includes additional features such as support for a wider range of syntax through the use of a symbol table, function calls with arguments, type validation, and informative error messages.