Skip to content

Optimization: avoid copying startByte and startPoint in Node struct #205

Open
@maxbrunsfeld

Description

@maxbrunsfeld

The TSNode type has cryptic field names, and uses accessor functions for start_byte() and start_point(), but in reality, these two fields correspond directly to fields on the node:

So when loading a node into haskell via the FFI, we can remove the separate startByte and startPoint fields from the Node struct, in order to reduce the amount of data that we copy. This breaks the encapsulation of the TSNode API, but I think that's ok to do in a Tree-sitter binding library.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions