AddCharClass() private method

private AddCharClass ( RegexCharClass cc ) : void
cc RegexCharClass
return void
示例#1
0
        internal bool AddFC(RegexFC fc, bool concatenate)
        {
            if (!_cc.CanMerge || !fc._cc.CanMerge)
            {
                return(false);
            }

            if (concatenate)
            {
                if (!_nullable)
                {
                    return(true);
                }

                if (!fc._nullable)
                {
                    _nullable = false;
                }
            }
            else
            {
                if (fc._nullable)
                {
                    _nullable = true;
                }
            }

            _caseInsensitive |= fc._caseInsensitive;
            _cc.AddCharClass(fc._cc);
            return(true);
        }
示例#2
0
        internal void AddFC(RegexFC fc, bool concatenate)
        {
            if (concatenate)
            {
                if (!_nullable)
                {
                    return;
                }

                if (!fc._nullable)
                {
                    _nullable = false;
                }
            }
            else
            {
                if (fc._nullable)
                {
                    _nullable = true;
                }
            }

            _caseInsensitive |= fc._caseInsensitive;
            _cc.AddCharClass(fc._cc);
        }