Transpile anything to everything!
summary
Compass adds a web‑friendly JavaScript transpiler that translates MongoDB queries and aggregations from any language to any language by combining ANTLR grammars (for parsing) with generated visitors, a shared code‑generation superclass, and a symbol table driven by YAML templates. Contributors add a language by supplying templates (for outputs) or a small visitor (for inputs), keeping development linear instead of quadratic. The system is pluggable, runs inside the Electron app, and already produces readable client snippets for Compass/Atlas.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 6:57Naive approach
- 14:29Remote development
- 16:44Requirements
- 18:56Compiler 101
- 19:35Building a tree
- 27:13Code
- 27:45Code Generation
- 30:23Generator
- 33:05JSON
- 34:17Simple Table
- 37:52Template Files
- 39:25Conclusion
related talks
33mEmbracing Black Magic: The Power of Code Transpilation
31mThe Different Transformation Stages of AOT Compilers
27mParsing, Compiling, and Static Metaprogramming
31mAST à la Vista, Baby
44mLet's talk about transpilers
46mCompilers, User Interfaces & the Rest of Us
26mDesign a new language in JS: from zero to autocomplete
34mThe boundless possibilities of transpilation
