Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect disable_liquid_c_nodes when parsing expressions #154

Merged
merged 1 commit into from
Aug 31, 2021

Conversation

dylanahsmith
Copy link
Contributor

@samdoiron pointed out that I hadn't gotten around to having expression parsing respect the disable_liquid_c_nodes: true parse option. This can be problematic when parsing liquid for some type of static analysis in the same program that also uses liquid-c, since it prevents liquid-c from being dynamically disabled just for that static analysis.

I had already made the necessary change to liquid in Shopify/liquid#1333 so that expressions could be parsed through the parse context. This PR makes the corresponding liquid-c change that overrides Liquid::ParseContext#parse_expression to make using Liquid::C::Expression conditional on the presence of the disable_liquid_c_nodes parse option.

@dylanahsmith dylanahsmith merged commit 2e5b674 into master Aug 31, 2021
@dylanahsmith dylanahsmith deleted the disable-expr-c-node branch August 31, 2021 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants