protected override ISyntaxVisitorAction Enter(
            DocumentNode node,
            IDocumentValidatorContext context)
        {
            context.Names.Clear();

            for (int i = 0; i < node.Definitions.Count; i++)
            {
                IDefinitionNode definition = node.Definitions[i];
                if (definition.Kind == NodeKind.FragmentDefinition)
                {
                    FragmentDefinitionNode fragment = (FragmentDefinitionNode)definition;
                    if (!context.Names.Add(fragment.Name.Value))
                    {
                        context.Errors.Add(context.FragmentNameNotUnique(fragment));
                    }
                }
            }

            context.Names.Clear();

            return(Continue);
        }