Skip to content

Instantly share code, notes, and snippets.

@akselqviller
Last active August 29, 2015 14:22
Show Gist options
  • Save akselqviller/e72c0d57c6f9f92422d1 to your computer and use it in GitHub Desktop.
Save akselqviller/e72c0d57c6f9f92422d1 to your computer and use it in GitHub Desktop.
private static LinkedTree<SExpNode> BuildTree(string literal, params LinkedTree<SExpNode>[] subNodes)
{
var node = new LinkedTree<SExpNode>(new SExpNode() { Literal = literal });
foreach (var subNode in subNodes)
{
node.AddSubNodeLast(subNode);
}
return node;
}
private static LinkedTree<SExpNode> BuildTree(string literal, params string[] subLiterals)
{
var node = new LinkedTree<SExpNode>(new SExpNode() { Literal = literal });
foreach (var subLiteral in subLiterals)
{
node.AddSubNodeLast(BuildTree(subLiteral));
}
return node;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment