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

Compile already parsed component #178

Open
Kal-Aster opened this issue Nov 14, 2024 · 4 comments
Open

Compile already parsed component #178

Kal-Aster opened this issue Nov 14, 2024 · 4 comments

Comments

@Kal-Aster
Copy link

Wouldn't it be possible to extract this code from the compile function and create a separated function to compile an already parsed component?

@Kal-Aster
Copy link
Author

I was thinking also that I need both the compiled code and the parsed document, so maybe the compile function could return both?
I think that extracting that code would be more explicit and clear, but either approach would work

@Kal-Aster
Copy link
Author

I saw that the compiler returns in "fragments" the output of the parser, so there's no need to do the parsing twice, but I don't think it will be bad to have the possibility to compile an already parsed document.

@GianlucaGuarini
Copy link
Member

What do you think if we make the source argument either a string or an already parsed component? Would this help?

@Kal-Aster
Copy link
Author

It would be useful indeed

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

2 participants