You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I managed to (un)serialize the parse tree, after some tweaking.
There are two issues:
The anonymous class (easily solved by naming it)
Trouble when unserializing because a single parser file (the generated parser) declares two namespaces (and one of them is not PSR-4). This can be hotfixed using unserialize-callback-func, but something could perhaps also be done upstream.
I can make a MR for the first part, if you're open.
✨ Feature request
Make the parser tree serializable with the
\serialize()
function.Motivation
Making the parser tree takes most of the total computation time.
If I could "cache" it somehow, it would be great !
Example
yields
Alternatives
Additional context
The
vt
time is the visitor. The rest could be cached, perhaps.On more complex scripts, with nested flow statements, it goes up to seconds.
The text was updated successfully, but these errors were encountered: