Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser: Allow specifying custom depth for optimization #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Vankata453
Copy link

int depth can now be specified in sexp::Parser::from_* functions. It can be used for omitting (not parsing) structures deeper than depth in the tree, starting from 0. This can optimize reading a few base properties from an otherwise big file.

The omitted objects/arrays will not be present in the parsed Value tree.

Additionally fixes an oversight where sexp::Parser::from_string_* didn't pass use_arrays to sexp::Parser::from_stream_*.

`int depth` can now be specified in `sexp::Parser::from_` functions. It can be used for omitting (not parsing) structures deeper than `depth` in the tree, starting from 0. This can optimize reading a few base properties from an otherwise big file.

The omitted objects/arrays will not be present in the parsed `Value` tree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant