Skip to content

[Q] How to build a tree_sitter::Tree from a sexp representation? #2293

Closed Answered by ahlinc
gagbo asked this question in Q&A
Discussion options

You must be logged in to vote

Tree-sitter doesn't support such case.

  1. Tree-sitter's trees are much complex internally and the S-Expression representation shows just a part.
  2. If it would be possible to serialize the tree it would take much more space on the disk that original text.

So for the first parse it's better to store an original text and may be in a compressed form.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gagbo
Comment options

Answer selected by gagbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2290 on May 27, 2023 11:46.