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

Change liquidjs parameter parsing to use Liquid’s Tokenizer #2679

Open
zachleat opened this issue Dec 6, 2022 · 2 comments
Open

Change liquidjs parameter parsing to use Liquid’s Tokenizer #2679

zachleat opened this issue Dec 6, 2022 · 2 comments

Comments

@zachleat
Copy link
Member

zachleat commented Dec 6, 2022

https://liquidjs.com/tutorials/parse-parameters.html#Parse-Parameters-as-Values
https://liquidjs.com/tutorials/parse-parameters.html#Parse-Key-Value-Pairs-as-Named-Parameters

Currently implementation predated those features and is using a one-off parser using moo: https://github.com/11ty/eleventy/blob/0f44f756a30247515033945e74e171a293bc75d5/src/Engines/Liquid.js

I think due to the size of this change, we’ll probably want a configuration escape hatch for folks to swap back to the old parameter parser

Excellent prior art #1263 #1733

@AleksandrHovhannisyan
Copy link
Contributor

Hey, just checking to see if you're accepting help/contributions for this issue. I noticed that 11ty's Liquid engine is currently only using moo in two places:

this.argLexer = moo.compile(Liquid.argumentLexerOptions);

lexer = moo.compile(Liquid.argumentLexerOptions);

By size of the change, do you mean that it's high impact, or are there other changes that would need to be made as well?

@jgerigmeyer
Copy link

@zachleat Any thoughts on @AleksandrHovhannisyan's question above? Would you be interested in contributions for this issue? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants