public void AddNode(object node) { object value = node; while (lists.Peek().Item2.Count > 0) { switch (lists.Peek().Item2.Pop()) { case QuoteType.Quote: value = new QuoteNode(value); break; case QuoteType.Backquote: value = new BackquoteNode(value); break; case QuoteType.Unquote: value = new UnquoteNode(value); break; case QuoteType.Splice: value = new SpliceNode(value); break; } } lists.Peek().Item1.Add(value); }
private void PrettyPrintSub(SpliceNode node) { stringWriter.Write("~@"); PrettyPrint(node.InnerValue); }
public object ExpandSplice(SpliceNode node, int backquoteDepth) { throw new ArgumentException("Cannot splice outside of list!"); }