<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GraphQLSharp.Language
{
    public class SyntaxError : Exception
    {
        public SyntaxError(Source source, int position, String description)
        {
            Source = source;
            Position = position;
            Description = description;
            Location = new SourceLocation(source, position);
        }

        public Source Source { get; set; }
        public int Position { get; set; }
        public string Description { get; set; }
        public SourceLocation Location { get; set; }

        /// <summary>
        /// Gets a message that describes the current exception.
        /// </summary>
        public override string Message
        {
            get
            {
                return String.Format("Syntax Error {0} ({1}:{2}) {3}\n\n{4}",
                    Source.Name,
                    Location.Line,
                    Location.Column,
                    Description,
                    HighlightSourceAtLocation(Source, Location));
            }
        }

        /// <summary><commit_msg>Fix warning for override on Error.Source.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GraphQLSharp.Language
{
    public class SyntaxError : Exception
    {
        public SyntaxError(Source source, int position, String description)
        {
            Source = source;
            Position = position;
            Description = description;
            Location = new SourceLocation(source, position);
        }

        public new Source Source { get; set; }
        public int Position { get; set; }
        public string Description { get; set; }
        public SourceLocation Location { get; set; }

        /// <summary>
        /// Gets a message that describes the current exception.
        /// </summary>
        public override string Message
        {
            get
            {
                return String.Format("Syntax Error {0} ({1}:{2}) {3}\n\n{4}",
                    Source.Name,
                    Location.Line,
                    Location.Column,
                    Description,
                    HighlightSourceAtLocation(Source, Location));
            }
        }

        /// <summary>
{'fraction_non_alphanumeric': 0.09045643153526971, 'fraction_numerical': 0.004149377593360996, 'mean_word_length': 1.6178067318132465, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3491829', 'n_tokens_mistral': 570, 'n_tokens_neox': 551, 'n_words': 167}