<commit_before>//     Compiler for programming language "Reni"
//     Copyright (C) 2011 <NAME>
// 
//     This program is free software: you can redistribute it and/or modify
//     it under the terms of the GNU General Public License as published by
//     the Free Software Foundation, either version 3 of the License, or
//     (at your option) any later version.
// 
//     This program is distributed in the hope that it will be useful,
//     but WITHOUT ANY WARRANTY; without even the implied warranty of
//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//     GNU General Public License for more details.
// 
//     You should have received a copy of the GNU General Public License
//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
//     
//     Comments, bugs and suggestions to hahoyer at yahoo.de

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using HWClassLibrary.Debug;

namespace Reni.Basics
{
    [Dump("Dump")]
    [Serializable]
    internal sealed class Category : ReniObject, IEquatable<Category>
    {
        private readonly bool _code;
        private readonly bool _type;
        private readonly bool _args;
        private readonly bool _size;
        private readonly bool _isDataLess;

        internal Category() { }

        internal Category(bool isDataLess, bool size, bool type, bool code, bool args)
        {
            _code = code;
            _type = type;
            _args = args;
            _isDataLess = isDataLess;
            _size = size;
        }

        [DebuggerHidden]
        public static Category Size { get { return new Category(false, true, false, false, false); } }

        [DebuggerHidden]
        public static Category Type { get { return new Category(false, false, true, false, false); } }

        [DebuggerHidden]
        public static Category Code { get { return new Category(false, false, false, true, false); } }

        [DebuggerHidden]
        public static Category CodeArgs { get { return new Category(false, false, false, false, true); } }

        [DebuggerHidden]
        public static Category IsDataLess { get { return new Category(true, false, false, false, false); } }

        [DebuggerHidden]
        public static Category None { get { return new Category(false, false, false, false, false); } }

        [DebuggerHidden]
        public static Category All { get { return new Category(true, true, true, true, true); } }

        public bool IsNone { get { return !HasAny; } }
        public bool HasCode { get { return _code; } }
        public bool HasType { get { return _type; } }
        public bool HasArgs { get { return _args; } }
        public bool HasSize { get { return _size; } }
        public bool HasIsDataLess { get { return _isDataLess; } }
        public bool HasAny { get { return _code || _type || _args || _size || _isDataLess; } }

        [DebuggerHidden]
        [DisableDump]
        public Category Typed { get { return this | Type; } }
        [DebuggerHidden]
        [DisableDump]
        public Category Argsed { get { return this | CodeArgs; } }
        public Category Replenished
        {
            get
            {
                var result = this;
                if(HasType || HasCode)
                    result |= Size;
                if(HasCode)
                    result |= CodeArgs;
                if(result.HasSize)
                    result |= IsDataLess;
                return result;
            }
        }

        [DebuggerHidden]
        public static Category operator |(Category x, Category y)
        {
            return new Category(x.HasIsDataLess || y.HasIsDataLess, x.HasSize || y.HasSize, x.HasType || y.HasType, x.HasCode || y.HasCode, x.HasArgs || y.HasArgs);<commit_msg>Incomplete bugfix: IsDataLess recursivity issues<commit_after>//     Compiler for programming language "Reni"
//     Copyright (C) 2011 <NAME>
// 
//     This program is free software: you can redistribute it and/or modify
//     it under the terms of the GNU General Public License as published by
//     the Free Software Foundation, either version 3 of the License, or
//     (at your option) any later version.
// 
//     This program is distributed in the hope that it will be useful,
//     but WITHOUT ANY WARRANTY; without even the implied warranty of
//     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//     GNU General Public License for more details.
// 
//     You should have received a copy of the GNU General Public License
//     along with this program.  If not, see <http://www.gnu.org/licenses/>.
//     
//     Comments, bugs and suggestions to hahoyer at yahoo.de

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using HWClassLibrary.Debug;

namespace Reni.Basics
{
    [Dump("Dump")]
    [Serializable]
    internal sealed class Category : ReniObject, IEquatable<Category>
    {
        private readonly bool _code;
        private readonly bool _type;
        private readonly bool _args;
        private readonly bool _size;
        private readonly bool _isDataLess;

        internal Category() { }

        internal Category(bool isDataLess, bool size, bool type, bool code, bool args)
        {
            _code = code;
            _type = type;
            _args = args;
            _isDataLess = isDataLess;
            _size = size;
        }

        [DebuggerHidden]
        public static Category Size { get { return new Category(false, true, false, false, false); } }

        [DebuggerHidden]
        public static Category Type { get { return new Category(false, false, true, false, false); } }

        [DebuggerHidden]
        public static Category Code { get { return new Category(false, false, false, true, false); } }

        [DebuggerHidden]
        public static Category CodeArgs { get { return new Category(false, false, false, false, true); } }

        [DebuggerHidden]
        public static Category IsDataLess { get { return new Category(true, false, false, false, false); } }

        [DebuggerHidden]
        public static Category None { get { return new Category(false, false, false, false, false); } }

        [DebuggerHidden]
        public static Category All { get { return new Category(true, true, true, true, true); } }

        public bool IsNone { get { return !HasAny; } }
        public bool HasCode { get { return _code; } }
        public bool HasType { get { return _type; } }
        public bool HasArgs { get { return _args; } }
        public bool HasSize { get { return _size; } }
        public bool HasIsDataLess { get { return _isDataLess; } }
        public bool HasAny { get { return _code || _type || _args || _size || _isDataLess; } }

        [DebuggerHidden]
        [DisableDump]
        public Category Typed { get { return this | Type; } }
        [DebuggerHidden]
        [DisableDump]
        public Category Argsed { get { return this | CodeArgs; } }
        public Category Replenished
        {
            get
            {
                var result = this;
                if(result.HasCode)
                {
                    result |= Size;
                    result |= CodeArgs;
                }
                
                if (result.HasSize)
                    result |= IsDataLess;
                return result;
            }
        }

        [DebuggerHidden]
        public static Category operator |(Category x, Category y)
        {
            return new Category(x.HasIsDataLess || y.HasIsDataLess, x.HasSize || y.HasSize, x.HasType || y.HasType, x.HasCode || y.HasCode, x.HasArgs || y.HasArgs);
{'fraction_non_alphanumeric': 0.08674198156083625, 'fraction_numerical': 0.001298532658096351, 'mean_word_length': 2.0894504612916167, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4485164', 'n_tokens_mistral': 2020, 'n_tokens_neox': 1988, 'n_words': 752}