Beispiel #1
0
            private static bool TryGetParentRecordNode(TexlNode node, out RecordNode recordNode)
            {
                Contracts.AssertValue(node);

                TexlNode parentNode = node;

                while (parentNode != null)
                {
                    if (parentNode.Kind == NodeKind.Record)
                    {
                        recordNode = parentNode.AsRecord();
                        return(true);
                    }

                    parentNode = parentNode.Parent;
                }

                recordNode = null;
                return(false);
            }