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

Is it possible to get the AST of a template? #30

Open
kulshekhar opened this issue Dec 16, 2016 · 2 comments
Open

Is it possible to get the AST of a template? #30

kulshekhar opened this issue Dec 16, 2016 · 2 comments

Comments

@kulshekhar
Copy link

Is it possible to use this package to fetch the AST of a mustache template?

@EasonPai
Copy link

EasonPai commented Jan 9, 2018

I would like to get tokens before rendering too.

What I want is to make sure if any token cannot be rendered with context,
then I put a default value to context for it before rendering.

@xxgreg
Copy link
Owner

xxgreg commented Jan 9, 2018

It's possible but not publicly exposed.

You can import: mustache/lib/src/parser.dart and then call parse() which returns List<Node>.

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

No branches or pull requests

3 participants