- Removed unused things
This commit is contained in:
Tristan B. Velloza Kildaire 2024-03-12 18:49:21 +02:00
parent 906822423a
commit 04e39beb86
1 changed files with 0 additions and 61 deletions

View File

@ -663,67 +663,6 @@ public final class Resolver
}
}
private struct SearchCtx
{
private Container ctnr;
private Statement stmt;
public Container container()
{
return this.ctnr;
}
public Statement statement()
{
return this.stmt;
}
}
public auto findFrom(string what)(SearchCtx ctx, Predicate!(SearchCtx) predicate)
{
// // If starting node is `null`, return `null`
// if(startingNode is null)
// {
// return null;
// }
// // Construct context
// // SearchCtx ctx = SearchCtx(startingNode.parentOf(), startingNode);
// gprintln(format("ctx is: %s", ctx));
// // If predicate is true then return
// // what was requested
// if(predicate(ctx))
// {
// static if(what == "ctxStatement")
// {
// return ctx.statement();
// }
// else static if(what == "ctxContainer")
// {
// return ctx.container();
// }
// else
// {
// pragma(msg, "Unsupported requested return type '"~what~"'");
// static assert(false);
// }
// }
// // If predicate is false, then we should
// // swim upwards
// else
// {
// SearchCtx ctxNew = SearchCtx()
// return findFrom!(what)(ctx.container(), predicate);
// }
return null;
}
/**
* Given a type-of `Container` and a starting `Statement` (AST node) this will
* swim upwards to try and find the first matching parent of which is of the given