Skip to content

Refactor to use an arena #83

@trishume

Description

@trishume

This would be a large project, and may never happen, but the architecture would work much better with an arena of Contexts instead of using Rc<RefCell<>> everywhere. Not only would the code be cleaner, but the lifetimes of SyntaxDefinition and SyntaxSet would be more correct, avoiding the footgun of dropping a SyntaxSet and keeping a cloned SyntaxDefinition that no longer has references to nested languages.

This would look something like using a Vec<Context> and indices everywhere.

It may also be easier to parallelize and make thread-safe, but that still requires extra work because of lazy regex compilation. See extensive discussion in #20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions