Open jimbaker opened 12 months ago
Further steps:
textwrap.indent
)ValueError
, or subclass) that refer to the original source, including expression text and its location (row/col).I was looking in Jinja's code for some good example Jinja templates from a performance perspective, but I didn't see any there. (Instead templates were focused on tests, which seem to be of limited applicability given that we assume more of the overall Python environment - imports, functions, etc just exist, and are extensively tested in Python itself.)
However, it was interesting to see some similarities in the code generation here - https://github.com/pallets/jinja/blob/main/src/jinja2/compiler.py#L300 including specifically the use of yield
.
Next steps for MVP:
LOAD_ATTR
/LOAD_GLOBAL
specialization should be fineValueError