mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-19 19:00:39 -07:00
Add Liquid::ParseContext#parse_expression for liquid-c node disabling (#1333)
We would like to be able to disable liquid-c VM rendering at runtime, but right now expression parsing is done using Expression.parse, which isn't aware of the parse context. That prevents us from conditionally compiling to VM code based on a parse option.
This commit is contained in:
@@ -45,8 +45,8 @@ module Liquid
|
||||
@@operators
|
||||
end
|
||||
|
||||
def self.parse_expression(markup)
|
||||
@@method_literals[markup] || Expression.parse(markup)
|
||||
def self.parse_expression(parse_context, markup)
|
||||
@@method_literals[markup] || parse_context.parse_expression(markup)
|
||||
end
|
||||
|
||||
attr_reader :attachment, :child_condition
|
||||
|
||||
Reference in New Issue
Block a user