mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-15 08:50:45 -07:00
- Create CompiledContext class that duck-types to Liquid::Context - CompiledContext provides: variable lookup, registers, strict_* flags - Update __lookup__ helper to: - Set context on Drops BEFORE accessing their methods - Call to_liquid on objects before lookup - Set context on nested Drop results - Change __lookup__ from def to lambda to capture __context__ closure - Update expression compiler to use __lookup__.call() syntax - Add CompiledTemplate.call options: registers, strict_variables, strict_filters Tests added: - test_compile_with_drop: Basic Drop property access - test_compile_with_drop_context_access: Drop using context to access other vars - test_compile_with_nested_drops: Chained Drop lookups - test_compile_with_forloop_drop: Built-in forloop compatibility - test_compile_with_registers: Drop accessing registers via context All 51 tests pass, 30/30 benchmark templates produce matching output.