Skip to content

Support parsing with a timeout #22

Description

@rmehri01

Not really sure the best way to go about this but it would be nice to be able to set a timeout since some larger files might take a while to parse (for example https://codeberg.org/ziglang/zig/src/commit/9636d76b6d26d142f7d23e6d25eec1c28cf571b4/src/codegen/x86_64/CodeGen.zig). tree-sitter already supports this with ts_parser_parse_with_options (https://github.com/tree-sitter/tree-sitter/blob/24a64db7ccb7dff830789cf44ecfeaacf7fee822/lib/include/tree_sitter/api.h#L330), I think it would just need to be exposed in treez and then here as well? Though from a quick look, it also looks like treez would need a newer version of tree-sitter to use ts_parser_parse_with_options or would have to use the older timeout api. I'm curious to get your thoughts on the best way to go about this and would be happy to help out with making the changes if needed :)

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