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

Ranges for foreach over sequence/mapping nodes #28

Closed
kiith-sa opened this issue Jan 27, 2015 · 0 comments
Closed

Ranges for foreach over sequence/mapping nodes #28

kiith-sa opened this issue Jan 27, 2015 · 0 comments

Comments

@kiith-sa
Copy link
Collaborator

Should be the first step to making D:YAML Nodes range based. Also, when this is added, the current opApply() should be deprecated (but kept for one/more releases).

E.g. sequence, mapping, mappingKeys, mappingValues. These will assert that the key is a sequence/mapping.

Example: string[] strings = node.mappingKeys.map!(n => n.as!string).array;

Range primitives of these ranges could be more @safe/pure/nothrow/@nogc than current monolithic opApply().

Future ranges could also include depth/breadth first range over all Nodes and their subnodes. The element of such ranges should include Node packed with current depth and maybe some more info.

@ghost ghost closed this as completed in e313fa1 Aug 19, 2017
This issue was closed.
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

No branches or pull requests

1 participant