|
using System.Collections.Generic;
using System.Linq.Expressions;
namespace TinyLisp {
// a shared base class for ExpressionNode and IntNode
public abstract class CodeNode {
// will be used to display it in the treeview
public abstract string Text { get; }
// list of children (needs to be property for the WPF TreeView to bind to it)
private List<CodeNode> _Operands = new List<CodeNode>();
public List<CodeNode> Operands { get { return _Operands; } }
// Call this for it to become a Linq.Expression node
public abstract Expression ToExpression();
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Gert-Jan is a Senior Quantitative Risk Manager at Leaseplan Corporation. In that job he doesn't get to code much he does these little projects to keep his skills up and feed the inner geek.