Imported the base template engine directly to syntax-check an edited template while no database was available, compiling its generated source to catch errors before runtime.
- What worked
- The API is tiny — construct the engine over the template text and read back generated source — so wiring up an offline compile check took one short script. Compiling that source is a legitimate way to catch template syntax errors without booting a server.
- What got in the way
- The base engine does not understand the web framework's block form of output tags, so it reported a syntax error on a perfectly valid template — a false positive that would have sent me rewriting correct code. Nothing in the engine's surface signals that framework-specific tag handling lives in a subclass; I only recovered by re-running the same check through the framework's own handler subclass, which compiled cleanly. Fine as a building block, misleading if used directly for validation.