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:
Dylan Thacker-Smith
2020-10-27 11:00:04 -04:00
committed by GitHub
parent 0e52706a5b
commit 10ea6144e0
10 changed files with 29 additions and 19 deletions
+4
View File
@@ -23,6 +23,10 @@ module Liquid
Liquid::BlockBody.new
end
def parse_expression(markup)
Expression.parse(markup)
end
def partial=(value)
@partial = value
@options = value ? partial_options : @template_options