//internals public object transform(object parent, IndentationNode node, Scope scope) { foreach (var matcher in _matchers) { var result = matcher.transform(node, parent, scope); if (result != null) { return(result); } } return(null); }
public object transform(IndentationNode node, object parent, Scope scope) { var result = Match(node.Value, parent, scope); if (result == null) { return(result); } if (Children != null) { foreach (var child in node.Children) { Children.transform(result, child, scope); } } return(result); }
public void AddChild(IndentationNode result) { ((List <IndentationNode>)Children).Add(result); }
public IndentationNode(IndentationNode parent, int depth) { Parent = parent; Depth = depth; Children = new List <IndentationNode>(); }