Exemplo n.º 1
0
        //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);
        }
Exemplo n.º 2
0
            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);
            }
Exemplo n.º 3
0
 public void AddChild(IndentationNode result)
 {
     ((List <IndentationNode>)Children).Add(result);
 }
Exemplo n.º 4
0
 public IndentationNode(IndentationNode parent, int depth)
 {
     Parent   = parent;
     Depth    = depth;
     Children = new List <IndentationNode>();
 }