System.Text.RegularExpressions.RegexCode.OpcodeBacktracks C# (CSharp) Method

OpcodeBacktracks() static private method

static private OpcodeBacktracks ( int Op ) : bool
Op int
return bool
        internal static bool OpcodeBacktracks(int Op)
        {
            Op &= Mask;

            switch (Op)
            {
                case Oneloop:
                case Notoneloop:
                case Setloop:
                case Onelazy:
                case Notonelazy:
                case Setlazy:
                case Lazybranch:
                case Branchmark:
                case Lazybranchmark:
                case Nullcount:
                case Setcount:
                case Branchcount:
                case Lazybranchcount:
                case Setmark:
                case Capturemark:
                case Getmark:
                case Setjump:
                case Backjump:
                case Forejump:
                case Goto:
                    return true;

                default:
                    return false;
            }
        }

Usage Example

Esempio n. 1
0
        /// <summary>
        /// Emits a zero-argument operation. Note that the emit
        /// functions all run in two modes: they can emit code, or
        /// they can just count the size of the code.
        /// </summary>
        private void Emit(int op)
        {
            if (RegexCode.OpcodeBacktracks(op))
            {
                _trackCount++;
            }

            _emitted.Append(op);
        }
All Usage Examples Of System.Text.RegularExpressions.RegexCode::OpcodeBacktracks