Skip to content

Allow reuse of AstPrinter instances? #4024

@xuorig

Description

@xuorig

Probably an odd use case, but when having to a lot of disjointed AST nodes, APIs like printAstCompact force the creation of an AstPrinter instance on every print call, which in turns allocates a Map to register all printers. The constructor is private. This can quickly become an issue when printing a large amount of nodes. Let me know if you have a preference on how to handle this use case, I can submit a PR 🙇

Metadata

Metadata

Assignees

No one assigned

    Labels

    keep-openTells Stale Bot to keep PRs and issues open

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions