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

Add ability for pass sequence builder to locate next relationship based on only previous #10

Open
thinker227 opened this issue Sep 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@thinker227
Copy link
Owner

Add the ability for CompilerPassSequenceBuilder to be able to find the next pass in sequence based on the Previous property of another pass.

CompilerPassSequenceBuilder builder = new();
builder.Root = "a";
builder.AddPass("a");
builder.AddPass("b")
    .WithPrevious("a");

The above would succeed despite pass a not having specified a Next, because b specifies a as its Previous. This would obviously require lookup based on the Previous property of the currently processed pass, although this could be somewhat mitigated by constructing a dictionary with the Previous as the key. There would also have to be some mechanism to ensure that if multiple passes specify the same Previous then an exception would be thrown.

@thinker227 thinker227 added the enhancement New feature or request label Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant